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
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
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
> 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
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
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;