Jump to content

Archived

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

adamjnz

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

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

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.