Jump to content

How to say it


manalnor

Recommended Posts

Hello friends,

 

Can you help me as always.

 

let say we have database table (id,user,name,code)

 

and i'm gonna say MYSQL

 

$qry="select * from table order by id desc";

 

Now how to say

 

select from table where (user) is not empty and (code) is not  'something'

 

:shrug: i did tried this

 

$qry="select * from table where user IS NOT NULL AND code IS NOT LIKE 'something' order by id desc";

 

but didn't work so how to say it and where i could learn such mysql commands cause i know it only in php like x == y and x != y ..ect

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/232077-how-to-say-it/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.