Saturday, January 31, 2004



I like the PHP function mysql_insert_id( ) .  I just found out about it.  It is good for when you just inserted on one table and you want to insert the autogenerated primary key into another table.  Almost serves as the equivalent of an Oracle sequence object, but not quite.

Works as follows

[ME]:  Damn.  I wonder how to find the user ID  for the brand new user without doing another query?

[Narrator from Dukes of Hazzard]:  "Well, son just try  $user_id = mysql_insert_id(); "


9:01:06 PM    comment []
 


This is what I've been thinking about, but without the words or concepts to say it.

By teaching them all to read, we have left them at the mercy of the printed word.

Thank You!


4:47:27 PM    comment []