Re: record pointer
| From: | Dan Shirah | Date: | Thu, 05 Jul 2007 19:32:39 +0000 |
| Subject: | Re: record pointer | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-43747@lists.php.net to get a copy of this message | ||
If I understand what you're asking, just write a simple query.
$picked = <your_selection>;
$sql = "SELECT * FROM <your_table> WHERE cat = '$picked'";
$result = mssql_query($sql) or die ("My_Error_Message");
$row = mssql_fetch_assoc($result);
$id = $row['id'];
$name = $row['name'];
$cat = $row['cat'];
echo $id; // shows your record id on the screen.
On 7/5/07, elk dolk <elkdolk@yahoo.com> wrote:
Hi all, My DB has the following columns: id, name ,cat. I want to select a cat i.e. cat=zzz when the query is finished I should see a specific record within this cat which is defined by id, like id=yyy Any idea how to do this? Is there a function or something like record pointer in MySQL ? cheers --------------------------------- Shape Yahoo! in your own image. Join our Network Research Panel today!