Welcome to WebmasterWorld Guest from 188.8.131.52
I am developing a very simple site, that, is no longer simple to me.
The following code does not work for me:
$db = mysql_connect(host, user, pass)or die(mysql_error());
mysql_select_db(NAME,$db) or die(mysql_error());
$query = "SELECT * FROM list WHERE \"%$form_type%\"='1'";
$result = mysql_query("$query") or die(mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
...Any idea why? Looks like the SQL statement works, but nothing prints out.
At the top of the results script, I am using the following:
That prints the form element of that name, which is also a table column name.
So, when it passes through to the SELECT statement, it should just pull results based on the values of that column, right?
I just implemented that, and the SELECT statement is not returning any records at all, leading me to believe that I have something going wrong.
I will take a look into why, and post back if I have future problems.
Thank you agin.
<added>Thank you Mavherick I knew I was typing that select wrong but was trying to go off memory which I dont have!</added>
[edited by: Knowles at 2:57 pm (utc) on Aug. 14, 2002]