I have a mySQL query in php:
$query = "SELECT serial FROM code WHERE type='".$type."' AND year='".$year."' AND subject='".$subject."' AND mounth='".$mounth."' AND day='".$day."' ORDER BY serial DESC LIMIT 1";
when I echo it (for debugging purposes) I see this:
SELECT serial FROM code WHERE type='in' AND year='391' AND subject='pcyear=393' AND mounth='04' AND day='1' ORDER BY serial DESC LIMIT 1
what is the problem near subject=’pcyear=393 ??
please help
I bet if you go back and
echo $subjectyou’ll getpcyear=393Check and make sure that
$subjectis assigned correctly.