Jump to content

Is it possible to echo a specific record in a MySQL table based on its ID column?


adamjnz

Recommended Posts

Yes. Are you having problems?

[code]<?php
$q = "select * from tablename where id='$somevariable'";
$rs = mysql_query($q) or die('Problem with the query: ' . $q . '<br />' . mysql_error());
$rw = mysql_fetch_assoc($rw);
echo '<pre>' . print_r($row,true) . '</pre>';
?>[/code]

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.