Hi everyone,
I have a little problem with odbc_exec function, the
following code lines works fine in PHP3, but when I
migrated to PHP3 didn't work any more.
//Server: MSSQL7
//OS: SunOS consola 5.7 Generic_106541-06
// sun4u sparc SUNW,Ultra-5_10
//PHP: PHP Version 4.0.4pl1
// Driver ODBC: Openlink
The code:
qry_categorias = "SELECT REAL_CAT_PADRE.* FROM
REAL_CAT_PADRE WHERE IDIOMA = '$idioma' ";
$qry_categorias.= " AND REAL_CAT_PADRE.ID_PADRE IN
(SELECT REAL_CAT_HIJO.ID_HIJO FROM REAL_CAT_HIJO WHERE
REAL_CAT_HIJO.ID_PADRE = '$cat') ";
$res_categorias = Odbc_Do($connection, $qry_categorias);
the error:
Warning: SQL error: [OpenLink][ODBC][Driver]Syntax error
or access, SQL state 37000 in SQLExecute in
/psitio/multihomed/www.elsitio.com/pub/cgi-bin/gl/av/pla
yer/buscador.php3 on line 357
it's a very rare error because if I reduce the large of
the query statement it's works.
i.e.
the following lines works fine in PHP4 and PHP3.
qry_categorias = "SELECT REAL_CAT_PADRE.* FROM
REAL_CAT_PADRE WHERE IDIOMA = '$idioma' ";
$res_categorias = Odbc_Do($connection, $qry_categorias);
Thanks in advance ...
Nico.
I have a little problem with odbc_exec function, the
following code lines works fine in PHP3, but when I
migrated to PHP3 didn't work any more.
//Server: MSSQL7
//OS: SunOS consola 5.7 Generic_106541-06
// sun4u sparc SUNW,Ultra-5_10
//PHP: PHP Version 4.0.4pl1
// Driver ODBC: Openlink
The code:
qry_categorias = "SELECT REAL_CAT_PADRE.* FROM
REAL_CAT_PADRE WHERE IDIOMA = '$idioma' ";
$qry_categorias.= " AND REAL_CAT_PADRE.ID_PADRE IN
(SELECT REAL_CAT_HIJO.ID_HIJO FROM REAL_CAT_HIJO WHERE
REAL_CAT_HIJO.ID_PADRE = '$cat') ";
$res_categorias = Odbc_Do($connection, $qry_categorias);
the error:
Warning: SQL error: [OpenLink][ODBC][Driver]Syntax error
or access, SQL state 37000 in SQLExecute in
/psitio/multihomed/www.elsitio.com/pub/cgi-bin/gl/av/pla
yer/buscador.php3 on line 357
it's a very rare error because if I reduce the large of
the query statement it's works.
i.e.
the following lines works fine in PHP4 and PHP3.
qry_categorias = "SELECT REAL_CAT_PADRE.* FROM
REAL_CAT_PADRE WHERE IDIOMA = '$idioma' ";
$res_categorias = Odbc_Do($connection, $qry_categorias);
Thanks in advance ...
Nico.