Jump to content

[SOLVED] Stupid problem - with null values


richrock

Recommended Posts

Hi, having a small issue with a MySQL statement :

 

$querycbpro = "SELECT id, firstname, lastname FROM jos_comprofiler ORDER BY lastname WHERE lastname IS NOT NULL";

 

But I get a syntax error near WHERE lastname....

 

Any ideas why?  If I remove the WHERE... IS NOT NULL, it works, but inserts a load of NULL values.  I want to ignore these.  The database was pre-set with the NULL value on the rows, so I can't do much about that.

 

Thanks

 

Rich

Link to comment
https://forums.phpfreaks.com/topic/103703-solved-stupid-problem-with-null-values/
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.