Are you getting any messge back from MYSQL about why your query isn't working? Have you tried phpMyAdmin? It will give you feedback if your query fails.
LC wrote:
I'm very new to mysql, and PHP ( like just a few days.
I've setup a mysql server, and created the database..entered some data, and have had no problem creating some pages that will list the data in a table.
The problem is when I try to limit the query using the WHERE statement.
The basic working sql query is as follows.
if(!isset($sqlf)) $sqlf = "SELECT * FROM listdata ORDER by et ";
$result = mysql_query("$sqlf",$db);
I have one column name pa that I want to check for a value = to the characters "N/A" that are entered
So I changed the sql statement to
if(!isset($sqlf)) $sqlf = "SELECT * FROM listdata where pa='N/A' ORDER by et ";
$result = mysql_query("$sqlf",$db);
which didn't work, and many different methods have not worked. any ideas will be greatly appreciated!