Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
blueprint
Forum Newbie
Posts: 5 Joined: Fri Dec 13, 2002 8:50 am
Post
by blueprint » Fri Dec 13, 2002 8:50 am
Code: Select all
$queryA = "SELECT MAX(id) FROM journal";
$resultA = mysql_query($queryA) or die("Couldnt retrieve journal.");
$day_max = mysql_fetch_array($resultA);
$queryB = "SELECT date,day,entry FROM journal WHERE id='$day_maxї0]'";
$resultB = mysql_query($queryB) or die("Couldnt retrieve journal.");
$latest_entry = mysql_fetch_array($resultB);
$latest = $latest_entryї0];
$latest .= "~Day ".$latest_entryї1];
echo $latest;
Why does this not print on the screen. Help would be greatly appreciated.
blueprint
Forum Newbie
Posts: 5 Joined: Fri Dec 13, 2002 8:50 am
Post
by blueprint » Fri Dec 13, 2002 9:22 am
thanx alot.
kcomer
Forum Contributor
Posts: 108 Joined: Tue Aug 27, 2002 8:50 am
Post
by kcomer » Fri Dec 13, 2002 12:11 pm
print all of your variables, make sure they are correct. Print your sql command, run them from the command line or in phpmyadmin. These steps will usually locate any probelms.