I have a database with these fields and I want to view in my browser all the data for the record where the id=1 (or any other number I choose) what would I have to use as the query? I know the connection string. I just don't know what to do after I connect. TIA,
if it's only a mysql tip you need, something simple like this is ok: SELECT * FROM yourtable WHERE id=yournumber; Code (markup):
Is it the PHP code you are looking for? This will get you going on the right foot: <? $result = mysql_query("SELECT * FROM database_table WHERE id = 1 LIMIT 1"); $row = mysql_fetch_array($result); foreach ($row as $fieldName => $field) { echo "Field: $fieldName, value: $field<br />\n"; } ?> Code (markup): Cheers!