I am calling my database to display on the page in a table. Currently i have a field called model where i list the different models of firearms. Ex. (Dt-11 Sporting, Dt-11 Sporting Left handed)
I am currently having a issue were it will not pull up all the requested info.
mysql_select_db("premiumguns") or die(mysql_error());
$make ='DT-11 Sporting';
if (isset($make)) {
$query = "SELECT Serial_No, Make, Model, Gauge, Barrel_Length, Price FROM PG_inv WHERE Model like '" . $make . "' ORDER BY PG_inv.Price";
}
else
{
$query = "SELECT Serial_No, Make, Model, Gauge, Barrel_Length, Price FROM PG_inv ORDER BY PG_inv.Price";
}
$result = mysql_query($query) or die(mysql_error())
As far as i am aware the Where Model like should pull all rows that have a model containing "DT-11 Sporting" Which should include the "Dt-11 Sporting Left Handed" described above. But when the page is loaded only fields containing exactly "DT-11 Sporting" are displayed. Am i missing something?
Thanks for your help in advance!