Quick noob question re query

I have a table set up and i’d like to limit the results i pull from it if a specific column is blank.

Do i use WHERE for this?

Something like

SELECT * FROM table_name WHERE column_name (what goes here?)

Thanks very much.

You can use the limit clause

$q = "SELECT * FROM mytable WHERE name = “‘Jon’ Limit 0,4”;

Excellent, that works but i couldn’t get it to only pull the rows with blank columns. I have just changed the submit query to put the word new in the column and have got the new query doing WHERE column=“new”;

It’s giving the desired results, i’d just be interested in seeing how to limit the results if a specific column is empty.


WHERE column = “”

This perhaps?

Sponsor our Newsletter | Privacy Policy | Terms of Service