Re: eof bof in php

From: Date: Sun, 21 Dec 2008 15:32:01 +0000
Subject: Re: eof bof in php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-284914@lists.php.net to get a copy of this message
On Sun, 2008-12-21 at 15:22 +0000, Gary Maddock-Greene wrote: > Hi, I'm very new to php. Please can someone point me in the right direction? > I want to display a message: 'No Products Found' if my search record set > returns no value. > > I think I need to be looking at this section of my code ... > > $query_rsSearch = sprintf("SELECT * FROM products WHERE product_name LIKE > %s", GetSQLValueString("%" . $colname_rsSearch . "%", > "text")); > $rsSearch = mysql_query($query_rsSearch, $sondia_lighting) or > die(mysql_error()); > $row_rsSearch = mysql_fetch_assoc($rsSearch); > $totalRows_rsSearch = mysql_num_rows($rsSearch); > ?> > > Thanks > > - Gary Maddock-Greene > > Can you not just use the $totalRows_rsSearch value inside of an if statement? Ash www.ashleysheridan.co.uk

« previous php.general (#284914) next »