> mysql_select_db("books");
> $query = "SELECT * FROM books WHERE ".$searchType." LIKE
> '%".$searchTerm."%'";
> $result = mysql_query($query);
>
> $num_results = mysql_num_rows($result); //This is where I am getting the
> error actually: "Warning: mysql_num_rows(): supplied argument is not
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Here's the syntax I use.
$db=mysql_connect( "$host", "$db_user","$db_password")
or die ("".mysql_error()."");
mysql_select_db("$db_name", $db);
$rs
maybe its best to echo your entire query string and post back as $searchType
could be anything , also a good way to check your query , is echo your query
string then do an sql query in phpmyadmin.
>= Original Message From "Lane Johnston" <[EMAIL PROTECTED]> =
>Ok php gurus,
>Little info
On Wed, 2003-01-22 at 00:31, Lane Johnston wrote:
> $query = "SELECT * FROM books WHERE ".$searchType." LIKE
> '%".$searchTerm."%'";
echo $query;
It might help seeing query syntax.
__
/ \\ @ __ __@ Adolfo Bello <[EMAIL PROTECTED]>
/ //
Ok php gurus,
Little info on system: XP, localhost, port 3306
i am tring to connect to a db in mysql and i looks like that I am doing
something wrong?
Here is the code...
@ $db = mysql_pconnect("localhost:3306", "omegaweb", "jesus316");
if( $db ) { echo "Connected"; }
if( !$db )
{
echo "Er