i don't see anything wrong with it... what's the deal? this is the results page that displays the results of a search query. Parse error: parse error in ../../../../merchandise/testreg/results.php on line 21
echo"Error: Could not connect to the database. Please try again later.";
exit;
}
mysql_select_db("registry_DB, $db);
$sql = mysql_query("SELECT brideLname, groomLname FROM my_search_table WHERE brideLname LIKE '%". $lname ."%' OR groomLname LIKE '%". $lname ."%'") or die(mysql_error();//<--- LINE 21 (entire SQL statement is on one line
$result = mysql_query($sql);
$num_result = mysql_num_rows($result);
echo "Number of matches: ". $num_result ."<br />";
Re: is there something wrong with my SQL statement?
the tables don't exist yet, but the database does... i get the following error when i click the submit button for a search. it seems to be combining my database name AND my table name....
Table 'registry_DB.my_search_table' doesn't exist
my database name is 'registry_DB'. my table name is 'my_search_table'. what's the deal here?
Last edited by boo_lolly; Nov 16th, 2006 at 1:49 pm.
i don't see anything wrong with it... what's the deal? this is the results page that displays the results of a search query. Parse error: parse error in ../../../../merchandise/testreg/results.php on line 21
echo"Error: Could not connect to the database. Please try again later.";
exit;
}
mysql_select_db("registry_DB, $db);
$sql = mysql_query("SELECT brideLname, groomLname FROM my_search_table WHERE brideLname LIKE '%". $lname ."%' OR groomLname LIKE '%". $lname ."%'") or die(mysql_error();//<--- LINE 21 (entire SQL statement is on one line
$result = mysql_query($sql);
$num_result = mysql_num_rows($result);
echo "Number of matches: ". $num_result ."<br />";
you have no text box... how would you search and your html form?
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.