Hello,
I am having a problem with my query that takes the input from a user on a form(code not attached but know it works like a champ) uses the data to do a simple select query and then displays it to a table. The query return's nothing.....however when i hardcode the 'CaseNo' it brings back results......so I probably have some stupid syntax error but after sitting here all day writing this I just can't figure out what is wrong.
I even trid to do a generic select query with passing the CaseNo and nothing so I am stumped.....
Thanks for you help in advance...
{}{}Code Starts below{}{}{}{}
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//EN" "hmpro6.dtd">
<HEAD>
<TITLE>Fiche Database results</TITLE>
</HEAD>
<BODY>
<?PHP
$connection=mysql_connect (localhost, username, pasword);
if($connection ==false) {
echo mysql_errno().":".mysql_error()."<br>";
exit;
}
$query="Select CaseNo,CaseName,DateFiled,DateTermed,DateReopen from case where CaseNo like 'CaseNo'";
$result=mysql_db_query("fichedb",$query);
if ($result) {
$numOFRows=mysql_num_rows($result);
for($i=0;$i<$numOFRows; $i++){
$CaseNo=mysql_result($result, $i, "CaseNo");
$CaseName=mysql_result($result, $i, "CaseName");
$DateFiled=mysql_result($result, $i, "DateFiled");
$DateTermed=mysql_result($result, $i, "DateTermed");
$DateReopen=mysql_result($result, $i, "DateReopen");
echo "<table border=2 width=98%>";
echo "<tr><td width=10%>$CaseNo</td><td width=11%>$CaseName</td><td width=13%>$DateFiled</td><td width=11%>$DateTermed</td><td width=12%>$DateReopen</td>
</tr>";
}
echo "</table>";
}
else{
echo mysql_errno().":".mysql_error()."<BR>";
}
mysql_close();
?>
</BODY>