Mysql Select Where id<100 -


i'm trying query in php:

$sql= "select pcampo6 productos id >= 100"; 

this error get:

invalid query: have error in sql syntax; check manual corresponds mysql server version right syntax use near '= 100' @ line 1 

i tried :

$sql = "select `pcampo6` productos eliminado=0 , `id` >= 101"; $sql = "select 'pcampo6' productos eliminado=0 , 'id' >= 101"; $sql = "select pcampo6 productos eliminado=0 , id >= '101'"; 

there nothing wrong query posted.

see demo

  • if id column not integer type, try using single quotes around value

the error coming elsewhere in code not showing us.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -