php - Searching for NULL value on button press -
i have button when click it, loads list. button sends value of it, uses value populate list based on that. have null , able select too. problem being can't color = null
. color null
<button value="null">null</div> <button value="white">white</div>
clicking white:
$q = $_get['q']; /--this gets white--/ $people = $db2->prepare("select name table color = ? "); $people->execute(array($q)); /--this searches white--/ $data = $people->fetchall(); foreach ($data $row): ?>
do have edit jquery function null value or there way make work this? thanks!
there null-safe equal operator in mysql, can write query
"select name table color <=> ?"
Comments
Post a Comment