Jump to content

Match two entires from a query result


brob

Recommended Posts

Well, to check for duplicates I'd use mysql_num_rows. As for displaying the id, a loop through them is the only method I know about.

 

<?php
//connect...
//query
if(mysql_num_rows($result) > 1)
{
//display ids
while($data = mysql_fetch_array($result))
{
echo $data['id'];
}
}
else
{
}
?>

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.