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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -