Simple database query
Posted: Wed Jul 23, 2003 2:03 pm
I am making a simple database query, one that I have made many times before but it keeps throwing back the error text, this is the code:
OK, so if I use this following query then I don't get the error:
Anyone any ideas where the problem could be? yes, there is a column called order in the portfolio table and it is an INT column.
Code: Select all
<?php
$sql="SELECT * FROM portfolio WHERE order=3";
$mysql_result=mysql_query($sql,$connection);
if (!mysql_query($sql,$connection)) {
echo "Error!";
}
?>Code: Select all
<?php
$sql="SELECT * FROM portfolio";
$mysql_result=mysql_query($sql,$connection);
if (!mysql_query($sql,$connection)) {
echo "Error!";
}
?>