|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-06-01 13:09 UTC] rasmus
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
I use the following code to insert a new row with autoincrement field in mysql: $query = "Insert into cart_user (uname,upass,email) "; $query .= "values ('$uname','$upass','$email')"; $insert = mysql($database,$query); $user_id = mysql_insert_id(); When I display $user_id, it is 0. What am I doing wrong?