SQL query issue again |
$sql = "SELECT item FROM survey_results WHERE user_email = ? AND taxyear = ? AND item_type='AC' "; //only look at Activities
$query2 = $this->db->query($sql, array($employee_email, $taxyear)); This query seems to work fine when I use [email protected] and 2017. But when I use [email protected] and 2017 it doesn't find anything. Could there be a problem with using an "@" in the string? If true, why would @yahii.com work? I originally had the taxyear as an integer. I changed that to a varchar. taxyear varchar(11) utf8mb4_bin. Could it be that my '2017' is only four chars, not 11?
proof that an old dog can learn new tricks
|
Messages In This Thread |
SQL query issue again - by richb201 - 11-03-2020, 01:10 PM
RE: SQL query issue again - by InsiteFX - 11-03-2020, 01:27 PM
RE: SQL query issue again - by richb201 - 11-05-2020, 05:33 AM
RE: SQL query issue again - by InsiteFX - 11-05-2020, 12:30 PM
RE: SQL query issue again - by richb201 - 11-07-2020, 09:41 PM
RE: SQL query issue again - by InsiteFX - 11-08-2020, 12:01 PM
|