Re: [PHP] verify text in field

2009-02-26 Thread PJ
ad...@buskirkgraphics.com wrote: > Try > $text = "Joe of Egypt"; > $sql = "SELECT title FROM book WHERE title LIKE '$text'"; > $result = mysql_query($sql); > If(mysql_num_rows($result) >= '1') > { > while ( $row = mysql_fetch_array($sql) ) { > echo("" . $row["title"] . ""); > } > } > > My Ideas my

Re: [PHP] verify text in field

2009-02-26 Thread Paul M Foster
On Thu, Feb 26, 2009 at 06:07:02PM -0500, PJ wrote: > Is there a shorter way of determining if a field contains text? > This works but I wonder if I can K.I.S.S. it? I really only need to know > if there is or is not a field containing the text specified. I don't > need to see it. > > // Reque

RE: [PHP] verify text in field

2009-02-26 Thread admin
Try $text = "Joe of Egypt"; $sql = "SELECT title FROM book WHERE title LIKE '$text'"; $result = mysql_query($sql); If(mysql_num_rows($result) >= '1') { while ( $row = mysql_fetch_array($sql) ) { echo("" . $row["title"] . ""); } } My Ideas my not make some people happy with my design but I