chriscloyd Posted November 28, 2006 Share Posted November 28, 2006 this is mysql error i get Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\index.php on line 188Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\index.php on line 188Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\index.php on line 188this is my code[code]<?php 182 //latestpost183 $re = mysql_query("SELECT * FROM `replies` WHERE cid = '$cid' ORDER BY `rid` DESC LIMIT 0 , 1");184 if($re){185 $r = mysql_fetch_assoc($re);186 $ltid = $r['tid'];187 $ttitle = mysql_query("SELECT * FROM `topics` WHERE tid = '$ltid' ORDER BY `tid` DESC LIMIT 0 , 1 ");188 $t = mysql_fetch_assoc("$ttitle");189 $lon = $r['time'];190 $lby = $r['by'];191 $lin = $t['title'];}?>[/code] Link to comment https://forums.phpfreaks.com/topic/28797-msyql-error/ Share on other sites More sharing options...
Barand Posted November 28, 2006 Share Posted November 28, 2006 188 $t = mysql_fetch_assoc("$ttitle"); <-- remove the quotes Link to comment https://forums.phpfreaks.com/topic/28797-msyql-error/#findComment-131854 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.