using php and mysql
i constructed an sql call that works: (ie., gets records)
$query="SELECT ad_number, ad_year,ad_make,ad_model,ad_location, ad_state, ad_city, ad_price
FROM pm_ads
WHERE ad_state = 'AZ'
ORDER BY ad_year DESC";
$result= mysql_query($query);
$linkID = mysql_connect("localhost", "parkmodels", "facemouth");
$resultID = mysql_select_db("parkmodels", $linkID);
print "Error: ".mysql_errno().";Error Desc: ".mysql_error();
?>
i am carrying over a variable ad_state from the previus page with PUT and define $ad_state = ad_state
if I do a print on $ad_state it prints out AZ...
so far so good...
if I make the following line change to the code:
WHERE ad_state = $ad_state
I GET NO RECORDS (no sql error msg either) but NO RECORDS
Help please, I am such an SQL weenie...