Hello. Ok, this is very weird. This script (posted just below) works perfectly. Here it is:
<?php
$db = mysql_connect("localhost","","");
mysql_select_db("dbthawowi_2",$db);;
$callsign = $HTTP_POST_VARS['id'];
$sql="SELECT id FROM evaluation WHERE average<1.5";
$result=mysql_query ($sql, $db);
$secondsql="SELECT id, joke FROM userjokes WHERE id='$sql' AND validation='yes'";
$secondresult=mysql_query ($sql, $db);
while ($row = mysql_fetch_object ($secondresult))
{
print "<td><a href=\"dump2.php?id=$row->id\" target=\"new\">" . $row->id . "</a>";
}
?>
The diffrence between this script and the one I posted before is this one reads rows with a rating of LESS than 1.5, while the above one reads ratings with more than 1.5.
But this is not my problem, I could just copy this scriopt and change "<" to ">" But, I need, instead of this printing the id, i want it to print the 'title'. This script still gives me a blank page:
<?php
$db = mysql_connect("localhost","","");
mysql_select_db("dbthawowi_2",$db);;
$callsign = $HTTP_POST_VARS['id'];
$sql="SELECT id FROM evaluation WHERE average>1.5";
$result=mysql_query ($sql, $db);
$secondsql="SELECT id, joke, title FROM userjokes WHERE id='$sql' AND validation='yes'";
$secondresult=mysql_query ($sql, $db);
while ($row = mysql_fetch_object ($secondresult))
{
print "<td><a href=\"dump2.php?id=$row->id\" target=\"new\">" . $row->title . "</a>";
}
?>
This script worked until I changed the 'print' function to say ". $row->title." from ". $row->id."
Can someone tell me why?
Thanks.