How do I find the ID of a new row added to a table?
Here's how you do it:
$q = mysql_query("INSERT INTO mytable VALUES('test')");
$rownumber = mysql_insert_id();
//$rownumber contains the id of the new row
More mysql PHP QuestionsI am extracting data from a MySQL Database of which one of the data stored is seperated by a comma. For example, step1,go here,step 2,go there,step 3,go back etc etc. I want to know how to split the data at the comma and format it in html. Using the split
how to write sessions in php code?
How do I find the longest value in my mysql table?
How do I order the results of my query?
How do I find second highest value from a table?