Thread: retrieving data
View Single Post
Old 11-28-2008, 07:20 AM   #2 (permalink)
zxt3st
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

i dont think if this is right..
PHP Code:
$html mysql_fetch_array(mysql_query("SELECT rules,tos FROM $tab[html];")) 
as what you can see in your error, you supplied a wrong parameter in your mysql_fetch_array() function in php.

In retrieving data from your tables have it like this way.

PHP Code:
$query "select * from table_name"#im using a wildcard(*) here as an example
$result mysql_query($query$resouce_link) or die("Could not execute query!.");

while(
$ban mysql_fetch_array($resultMYSQL_BOTH))
{
    
# do something here...

and its much better if you post your entire code here, so that we can help you and we will know what really is the problem in it. Im confuse in your select statement
Code:
$tab[html]
? i dont think so if your having a table name like that or your table name is stored in an array? or a variable? its confusing.
Have a good read in the manual here.MySql 5.0 Reference Manual

Also if you try to check your while statement, where did you get the $getbans variable? I guess you need to replace it with a variable stored with a query.
e.g
Code:
$getban = mysql_query("some sql query here", $resource_link) or die("You Fail!");

All the best,
t3st
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote