Jump to content

[SOLVED] num rows


forumnz

Recommended Posts

How do I add num_rows into this so that I can count the results?

 

Code snippet:

<?php

$sql = "SELECT * FROM fflists WHERE $op='$trim' AND (keywords LIKE '%$key%' OR business_name LIKE '%$key%') AND (c1 LIKE '%$cuis%' OR c2 LIKE '%$cuis%' OR c3 LIKE '%$cuis%' OR c4 LIKE '%$cuis%' OR c5 LIKE '%$cuis%') ORDER BY keywords ASC";
  
$result = mysql_query($sql) or die(mysql_error()); 
  
while($row = mysql_fetch_array($result))
{
$name = $row['business_name'];
$a = $row['id'];
echo "<a class=two href=http://www.foodfinder.co.nz/Browse/Listing/?id=" . $a . ">" . $name . "</a><br>";
}
}

?>

 

Thanks,

Sam.

Link to comment
https://forums.phpfreaks.com/topic/87686-solved-num-rows/
Share on other sites

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.