PHP-DB
PHP-DB copied to clipboard
Example of IN statement
Hi,
I have the following statement:
$result = $this->db->exec(
" SELECT userImage FROM candid WHERE id = ? AND status IN ? ",
[
$userid,
$status
]
);
And $status = array('active','idle');
I am unable to fetch results from database.
I even tried changing $status from array to variable:
$status = "'interview','pending'";
Can you please help?
Note: This is a question and not an issue.