$db = mysql_connect("localhost",
@mysql_select_db("database
$query = "SELECT * FROM products WHERE category = 'accounting_finance' ORDER BY field2";
$result = mysql_query($query) or die(mysql_error().$query);
while ($row = mysql_fetch_array($result)
{
echo "
<tr><td>$row[field1]</td>
<td>$row[field2]</td>
<td>$row[field3]</td>
<td>$row[field4]</td></tr>
";
}
this will give you a good error message that you will be able to debug
Main Topics
Browse All Topics





by: prady_21Posted on 2003-09-16 at 02:37:48ID: 9369130
after ur first line add this
er","passw ord") or die ("Cannot connect to Mysql\n"); ", $connection) or die ("could not select the database"); , $connection);
<?php
error_reporting(E_ALL);
and then for the mysql connections, try the following
$connection = mysql_connect("server","us
$selectdb = mysql_select_db("$Database
$result = mysql_query($sql_statement
post the errors if any now
also try this in mysql command line and see if the result is not zero rows
SELECT * FROM products WHERE category = 'accounting_finance' ORDER BY field2;