Davy, maybe you can try something like "select max(id) as maxid from poll".
Mihai On Thu, 3 Oct 2002, Davy Obdam wrote: > Hiya people,.. > > I have a script and i need to get the last id from the database. I have > to get this id to determine whats the latest poll and display that poll > on the page. Now i use this: > > if(!$poll) > { > $select = mysql_query("SELECT id FROM poll"); > $poll = mysql_num_rows($select); > } > > Well everything goes alright if u dont remove any polls.. this just > counts the mumber of rows in the database. Can anyone help me with and > idea how to get the latest id from the database, so that i am able to > delete polls from the database. I ve tried mysql_insert_id(); but i cant > get it to work. Thanks already for your help. > > Thanks,.. > > Davy Obdam > mailto:[EMAIL PROTECTED] > url: http:///www.davyobdam.com > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php