Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does FQL have a "NOT NULL" type operator?

I'm messing around with FQL, and I have this query:

SELECT created_time, attachment, message FROM stream  WHERE source_id = me() LIMIT 1000

which returns 1000 results, most not relevant to me. I'd like to filter, for example, on MESSAGE IS NOT NULL. Is that (or something equivalent) possible with FQL?

like image 663
blueberryfields Avatar asked Oct 05 '12 21:10

blueberryfields


2 Answers

Just adding AND message to the WHERE clause works as well – an empty value is considered “false” by FQL.

like image 156
CBroe Avatar answered Nov 01 '22 18:11

CBroe


Add type to the SELECT clause and in the WHERE clause add AND type > 0.

like image 3
Marty Stake Avatar answered Nov 01 '22 18:11

Marty Stake