$searchtext") ;
IF (isset($searchjoke)):
$searchtext="" ;
// BEGIN Enter Search Data
?>
$searchtext") ;
ELSE:
// BEGIN Connect to the database server
$dbcnx = @mysql_connect("localhost", "ddm993c", "winscale1");
if (!$dbcnx) {
echo( "
Unable to connect to the " .
"database server at this time.
Unable to locate the joke " .
"database at this time.
Here are all the jokes " .
"in The database:
searchtext is:" . $searchtext) ;
$result = mysql_query('SELECT * FROM `Jokes` ORDER BY `ID` DESC LIMIT 0, 30 ');
echo("
$result
");
else:
echo("
searchtext is:" . $searchtext) ;
$result = mysql_query('SELECT * FROM `Jokes` WHERE `JokeText` LIKE CONVERT(_utf8 \'%$searchtext%\' USING latin1) COLLATE latin1_general_ci');
// $result = mysql_query('SELECT * FROM `Jokes` WHERE `JokeText` LIKE CONVERT(_utf8 \'%Joke Number 6%\' USING latin1) COLLATE latin1_general_ci');
// $result = mysql_query('SELECT * FROM `Jokes` WHERE `JokeText` LIKE "Joke Number 6" ');
// $result = mysql_query('SELECT * FROM `Jokes` WHERE `JokeText` LIKE \'%$searchtext%\' ');
$searchtext="";
echo("$result");
ENDIF;
// $result = mysql_query('SELECT * FROM `Jokes` WHERE 'JokeText' LIKE \'Joke Number Three\' ');
if (!$result) {
echo("
Error performing query: " .
mysql_error() . "
$i . $jokeid . $joketext ");
}
// while ( $row = mysql_fetch_array($result) ) {
// $jokeid = $row["ID"];
// $joketext = $row["JokeText"];
// echo("
$jokeid . $joketext ");
// }
//ELSE:
// echo("
No Result");
//ENDIF;
// END RETRIEVE AND DISPLAY ALL JOKES
// BEGIN Search Link
// When clicked, this link will load this page
// with the joke sEARCH form displayed.
echo("