Re: [PHP-DOC] Re: deprecated mysql funcs

2004-01-06 Thread Paul DuBois
At 16:06 +0100 1/5/04, Jakub Vrana wrote: Gabor Hojtsy wrote: Read the docs of the function, it is not the same. The function is supposed to return the ID *you have inserted* in this session, while the SELECT return the ID last *inserted by someone*, maybe paralelly to your session. That is inc

Re: [PHP-DOC] Re: deprecated mysql funcs

2004-01-05 Thread Hartmut Holzgraefe
Mehdi Achour wrote: Friedhelm Betz wrote: Hi, these funcs are considered deprecated and suggested to use proper SQL syntax instead. >> [...] Probably some more? What about : [...] mysql_insert_idSELECT LAST_INSERT_ID(); without mysql_insert_id() it would take three calls (query, fetch, fre

Re: [PHP-DOC] Re: deprecated mysql funcs

2004-01-05 Thread Jakub Vrana
Gabor Hojtsy wrote: > Read the docs of the function, it is not the same. The function is > supposed to return the ID *you have inserted* in this session, while the > SELECT return the ID last *inserted by someone*, maybe paralelly to your > session. MySQL LAST_INSERT_ID() documentation says: "The

Re: [PHP-DOC] Re: deprecated mysql funcs

2004-01-05 Thread Jakub Vrana
> mysql_insert_idSELECT LAST_INSERT_ID(); > mysql_select_dbUSE mydb I object to marking these two as deprecated as they are very common and easy to use. Jakub Vrana

Re: [PHP-DOC] Re: deprecated mysql funcs

2004-01-05 Thread Gabor Hojtsy
mysql_insert_idSELECT LAST_INSERT_ID(); Read the docs of the function, it is not the same. The function is supposed to return the ID *you have inserted* in this session, while the SELECT return the ID last *inserted by someone*, maybe paralelly to your session. Goba

[PHP-DOC] Re: deprecated mysql funcs

2004-01-05 Thread Mehdi Achour
Friedhelm Betz wrote: Hi, these funcs are considered deprecated and suggested to use proper SQL syntax instead. mysql_create_db mysql_db_query mysql_drop_db mysql_list_fields mysql_list_tables Following the same logic these should also considered deprecated? mysql_list_dbs SHOW databases;