Answer the question
In order to leave comments, you need to log in
Oracle 10G + php7 How to enter data from a field in sql query?
Mistake:
Warning: oci_bind_by_name(): ORA-01036: неверное имя/номер переменной
$fir = $_POST['date1'];
$end = $_POST['date2'];
$row = oci_parse($conn, "Select distinct MG.*, OTD.* from MG, OTD, HK where HK.DG>=':DST' and HK.DG<=':DED'");
oci_bind_by_name($row, ':DST', $fir);
oci_bind_by_name($row, ':DED', $end);
<p>Ваше время <input type="text" name="date1" value="01.02.2017"/>
<p>Ваше время <input type="text" name="date2" value="01.03.2017"/><input type="submit" />
Answer the question
In order to leave comments, you need to log in
Try
$row = oci_parse($conn, "Select distinct MG.*, OTD.* from MG, OTD, HK where HK.DG>=:DST and HK.DG<=:DED");
The error disappeared, but now a strange situation - there are no errors, but nothing happens. I will continue the code. I can't figure out what's wrong? There is no conclusion. The query works in the DBMS, similar code is executed in another file. There are still suspicions that something is wrong with the fields anyway.
oci_execute($row, OCI_DEFAULT);
while ($get_result = oci_fetch_assoc($row)){
$result[NPP] = $get_result;
return $result;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question