problems with a select query in informix

From: Date: Wed, 05 Jul 2000 13:07:58 +0000
Subject: problems with a select query in informix
Groups: php.general 
Request: Send a blank email to php-general+get-4926@lists.php.net to get a copy of this message
hello, I got a problem, and I think it has to do with my low knowledge about how php treats arrays. What I do is this: 1) I do an insert to the articulo table with some data. 2) I run the hack below to read the biggest integer in articulo.a_id for later use. articulo.a_id is a SERIAL. $q_id_identi=ifx_query("SELECT MAX (a_id) FROM articulo",$conn_id); $q_ar_identi=ifx_fetch_row($q_id_identi); echo(sprintf("<br> %d <br>",$q_ar_identi[a_id])); The problem is that the echo you see above give me 0. But if I make the query directly in dbaccess (an informix program which lets throw querys) and the answer is diferent. What am I doing wrong??? -- "And I'm happy, because you make me feel good, about me." - Melvin Udall ----------------------------------------------------------------- Martín Marqués email: martin@math.unl.edu.ar Santa Fe - Argentina http://math.unl.edu.ar/~martin/ Administrador de sistemas en math.unl.edu.ar -----------------------------------------------------------------

« previous php.general (#4926) next »