well here is the part of my script that is malfuctioning.
require "config2.php";
require "config.php";
$result = mysql_query( "SELECT `sum` FROM `subs`" );
$sq = mysql_fetch_assoc($result);
$value = $sq['sum'];
$val = preg_replace('/$/', '', $value);
?>
<br>
<?php
echo $val;
$query = mysql_query( "SELECT title, threadid FROM `thread` WHERE forumid = '10' ORDER BY threadid LIMIT '". $val ."' , 10" );
while( $row = mysql_fetch_assoc( $query ) ) {
?>
i get thsi error
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
and from the code above this is the line it is refering to
while( $row = mysql_fetch_assoc( $query ) ) {
i am compleatly lost. i have no idea what so ever is wrong.