подскажите в чем проблема? как передать дату в SQ:L
Ведь дата выходит в нужном формате
<?php
$strconnect = 'localhost';
if (!($db=ibase_connect($strconnect, 'sysdba', 'masterkey', 'ISO8859_1', 0, 1)))
die('nil ' . ibase_errmsg());
$d = date("d.m.Y");
echo $d;
$sql = "SELECT count(*) FROM P WHERE DATE = '$d'";
$cursor = ibase_query($sql);
$row_array = ibase_fetch_row($cursor);
print_r($row_array);
ibase_free_result($cursor);
ibase_close($db);
?>
Error:
# php test.php
18.02.2021PHP Warning: ibase_query(): Dynamic SQL Error SQL error code = -206 Column unknown ID Client SQL dialect 1 does not support reference to BIGINT datatype in /var/www/html/stat/test.php on line 18
PHP Warning: ibase_fetch_row() expects parameter 1 to be resource, boolean given in /var/www/html/stat/test.php on line 19
PHP Warning: ibase_free_result() expects parameter 1 to be resource, boolean given in /var/www/html/stat/test.php on line 23