[PHP] Re: retrieve single field from database without while loop

2005-02-16 Thread pete M
Check out abstraction layers I use adodb http://adodb.sourceforge.net/ makes coding much much easier ;-)) eg - mysql example $sql = "insert into table (col, col2)values('$this','$that')"; $db->execute $sql; // get last id $new_id = $db->getOne('select last_insert_id()'); have fun Pete [EMAIL PROTE

[PHP] Re: retrieve single field from database without while loop

2005-02-16 Thread Matthew Weier O'Phinney
* [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Is there a way to retrieve and display a single value (customer number) from > a database and display it without using > > while ($row = mysql_fetch_array) ($result)){ > > > I have a value I know the query will only ever return a single value. I want > t