Re: MySQL Native Function in PHP Query Not Working?
| From: | Chris Lee | Date: | Tue, 18 Dec 2001 17:44:45 +0000 |
| Subject: | Re: MySQL Native Function in PHP Query Not Working? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78109@lists.php.net to get a copy of this message | ||
that command doesnt even work from the mysql command prompt for me, Ive
never used LAST_INSERT_ID(), but it dont work for me. try it on your mysql
command prompt.
--
Chris Lee
lee@mediawaveonline.com
"Ise" <ise@tao.ca> wrote in message
news:ELEGLBLIMMILFAOLDIPEIEAPCOAA.ise@tao.ca...
> Hello,
>
> Can someone explain to me why the below SQL query when executed with the
PHP
> mysql functions does not work? (it returns nothing)
>
> SELECT * FROM table WHERE aid=LAST_INSERT_ID()
>
> If I replace the MySQL function "LAST_INSERT_ID()" with a integer, it
works
> fine so its not the query. Further, I was returned results on the above
> query when I ran it directly from a MySQL client. Does PHP not support
> certain MySQL native functions?
>
>
> Thanks,
>
> Michael Caplan
> Institute for Social Ecology
> http://www.social-ecology.org/
>
> 1118 Maple Hill Road
> Plainfield, VT, 05667 USA
>
> Tel.: 1 (514) 421-3515
> General Tel. / Fax.: 1 (802) 454-8493
>