Re: [PHP-DB] Re: finding data

2004-04-15 Thread Mikael Grön
The way I would do it: $result = mysql_query("select * from bivalues WHERE myvalue - '$zchar'); if (mysql_num_rows($result) { echo "Result 2 - found it"; } else { echo "Not found"; } This leaves you with the option to start processing the data as soon as error checking is over. Us

[PHP-DB] Re: finding data

2004-04-15 Thread pete M
the way I would do this is with count() $row = mysql_fetch_assoc("SELECT count(*) as c FROM bivalues WHERE myvalue = '$zchar'") if ($row['c'] > 0) { echo 'result 2 - found it' }else{ echo 'NOT found' } hope it helps Pete Douglas D Hull wrote: I am trying to find data, or if not