Jump to content
xisto Community
Sign in to follow this  
tariqrf

Mysql Script Not Supported?

Recommended Posts

i put up a PHP and MYSQL site recently, which was hosted on tripod(loosers), where it used to work fine,

i put i up here again, it says:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/tariq/public_html/fsgr/script/orders.php on line 47

what does this mean, is the PHP or MYSQL version up to date?? or is there somthing wrong with my coding,


Please help
Tariq

Share this post


Link to post
Share on other sites

Something's wrong with your code. That happens to me a lot, too. I can usually fix it by just messing around with how I do the query. It's also sometimes a problem with variables getting lost. Try making it echo the query ($query = etc.; mysql_query($query); echo $query;) to see if it's doing it right.

Share this post


Link to post
Share on other sites

Something's wrong with your code. That happens to me a lot, too. I can usually fix it by just messing around with how I do the query. It's also sometimes a problem with variables getting lost. Try making it echo the query ($query = etc.; mysql_query($query); echo $query;) to see if it's doing it right.

132116[/snapback]


 

<?$res = mysql_query("select * from orders");while($row = mysql_fetch_array($res)){  print "<tr><td valign=top>" . $row['orderid'] . "</td><td>" . $row['name'] . "</td><td>" . $row['tel'] . "</td><td>" . $row['address'] . "</td><td>" . $row['cart'] . "</td><td>" . $row['comments'] . "</td><td><a href=\"delete.php?id=" . $row['id'] . "\">delete</a></td></tr>";}?>

this is the full code,,, whats wrong???

Share this post


Link to post
Share on other sites

More than likely you didn't created the table orders, or perhaps there I no data there.So make sure the table exists, has some columns is it, and has some data (but this really shouldn't matter)

Share this post


Link to post
Share on other sites

when you transferred your site from tripod, you should look into it that you did not just transfer the PHP files only, but also the MYSQL database accessed by your pages as well. if you desire to start from scratch with your database, just create the appropriate DB from your cpanel. :lol:if it has been working with tripod before, there's no reason it wouldn't run with Xisto too.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.