I'm having a strange problem with a website I'm working on. What I want to do is pass a SQL query variable (in this case cid) using a link, but for some reason it just isn't working.
This type of query works just fine on other pages of this site, but when I try it here, the variable isn't passed.
Here is my SQL query:
$query = 'SELECT CID AS "Course ID", courseNumber AS "Course Number", courseNumber AS "Course Number", startDate AS "Starts", endDate AS "Through", facAddress as "Location", facCity as "Location", county as "County" FROM class where CID="$cid"';
I would think that this link would then pass the CID number (in this case 12) to the report query.
https://www.contractor-training-ca.org/mailer/report.php?cid=12
Instead, I get this error:
Unknown column '$cid' in 'where clause'
It's probably something really stupid that I'm missing, any help would be appreciated...