I have been receiving the following error Error: with query id #7 and i have been unable to find where the error occurs. This is the code on the page.
This is the query on the page that is erroring
I can post more if needed but im hoping someone can see my error.Code:mysql_connect($db_host, $db_user, $db_pass) or die ('Error: Unable to connect'); mysql_select_db($db_name) or die ('Error: Unable to open the database.'); $query = "SELECT * from $db_table ORDER by id DESC LIMIT $from, $limit"; $result = mysql_query($query); $count = mysql_num_rows($result); $table_counter='0'; if ($count>0) { while($myrow = mysql_fetch_array($result)){ $comments = $myrow['comments']; if (strlen($comments)>95) {$comments = substr($comments,0,95). "..."; } $when = explode(" ",$myrow['dated']); if ($date_format == '1'){ $exdate = $when[0]; list($year, $month, $day) = split('[/.-]', $exdate); $when = $month .'-'. $day .'-'. $year; } else { $when= $when[0]; } $isOK = $myrow['is_approved']; $isOKimg = "approved"; if ($isOK == 0) { $isOKimg = "unapproved";} $cap_word = ucwords($isOKimg); $image_rating = $myrow['rating'] * 10; $star_image = "<img src='../images/stars/blue_".$image_rating.".gif'>"; if ($select_color == $myrow['id']){ $tbl_bg='#FFCAE9'; if ($table_counter == 1){ $table_counter='0'; } } else{ if ($table_counter == 1){ $tbl_bg='#D6E0EF'; $table_counter='0'; } else { $tbl_bg='#FFFFFF'; $table_counter=$table_counter+1;} }


LinkBack URL
About LinkBacks
Reply With Quote
