I have this query that’s selecting data from my database:
$sql_blabs = mysql_query("SELECT username,firstname,blab,date,image FROM testimonials WHERE ....... ORDER BY date DESC LIMIT 5");
But I would like it to select the data where blab has info in it. I mean, the query should be selecting those blabs that have data and not the empty ones. How do I do that?
What do I write after WHERE…
Ok I listened to both of you and solved it.
I wrote this:
mysql_query(“SELECT * FROM testimonials WHERE blab IS NOT NULL ORDER BY date DESC LIMIT 5”);
and I changed blab in sql database to be NULL by defaul.