Quick noob question re query


#1

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.


#2

You can use the limit clause

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


#3

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.

Thanks


#4

WHERE column = “”

This perhaps?