Guys please help :-<
the following has been giving me hassle for the last 3 hours:
<?
if (!($db_select=mysql_connect("localhost","******","******"))) {
echo "error1";
} else {
echo "<br >selected ";
}
if (!($db_connect=mysql_select_db("example_forum_db"))) {
echo "error2";
} else {
echo "<br >connected";
}
$counter=0;
$query="SELECT * FROM FORUM_MESSAGES WHERE MY_PARENT=0 ORDER BY ID DESC LIMIT $counter,50;";
$topic_query = mysql_db_query($db_connect,$query);
if (!($topic_query)) {
echo "<br>error3";
} else {
echo "<br>executed";
}
?>
Basically everything is fine upto the last if statement giving me the indication that there is something wrong with the SQL statement.
I tried the statement in the mysql command prompt and it word with absolute values i.e. 0, but not when i run the script.
I am starting to loose the will to live......
Any thoughts
Sunit