' . $query); while ($row = mysql_fetch_assoc($result)) { $debug = $row['debug']; $main_showtitle = $row['main_showtitle']; $main_showdate = $row['main_showdate']; $main_showauth = $row['main_showauth']; $main_showauthweb = $row['main_showauthweb']; if($debug==1){ error_reporting(E_ALL); } echo("
| \n"); //Create the initial table
/* this query will get a particular testimonial, depending on the ID passed in the URL*/
$query = ("SELECT id,active,author,authorweb,authorwebname,title,testtext," .
"DATE_FORMAT(postdate, '%M %D, %Y') as date " .
"FROM ".$prefix."testimonials WHERE id=$id");
$result = mysql_query ($query) or die('MySQL error: ' . mysql_error() . ' ' . $query); $result_rows = mysql_num_rows($result); /*Shut them down if the record does not exist.*/ if($result_rows==0){ echo ("
"); } } } echo (" | |||||||
| \n"); //Create the initial table
/*Doing the data grab for all active testimonials*/
$query = ("SELECT id,active,author,authorweb,authorwebname,title,testtext," .
"DATE_FORMAT(postdate, '%M %D, %Y') as date " .
"FROM ".$prefix."testimonials WHERE active=1 ORDER BY postdate DESC");
$result = mysql_query ($query) or die('MySQL error: ' . mysql_error() . ' ' . $query); while ($row = mysql_fetch_assoc ($result)) { /* display testimonials in a simple table */ $date = $row['date']; $author = $row['author']; $authorweb = $row['authorweb']; $authorwebname = $row['authorwebname']; $title = $row['title']; $testtext = $row['testtext']; /* display the data */ echo("
"); } echo (" | |||||