Forum Moderators: coopster

Message Too Old, No Replies

Dreamweaver MX Repeat Region problem

         

webmannw

10:43 am on Aug 26, 2004 (gmt 0)

10+ Year Member



Hi all,

Wonder if you could help me with an annoying problem!

Im working in Dreamweaver MX with PHP and on a search retults page I keep getting the following MySQL error:

Warning: Supplied argument is not a valid MySQL result resource in /usr/home/dspurdle/public_html/admin/admin_news.php on line 33

Line 33 looks like this:
$totalRows_rsAdminNews = mysql_num_rows($all_rsAdminNews);

It only happens when I put a repeat region onthe page.

Is this a Dreamweaver thing or am i missing something?

Thanks

coopster

12:18 pm on Aug 26, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The supplied argument that is not a valid MySQL result resource in this case is the $all_rsAdminNews variable.
$totalRows_rsAdminNews = mysql_num_rows($all_rsAdminNews);
It seems your query statement is invalid. I often use a variable to build my query statement so I can echo the variable to the browser to see what is wrong with it.
$sql = "SELECT ... " 
exit($sql);
mysql_query($sql);
...

webmannw

4:02 pm on Aug 26, 2004 (gmt 0)

10+ Year Member



Thanks...will try that:)