Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Mysql Script Not Supported?
tariqrf
post Apr 20 2005, 07:01 AM
Post #1


Member [Level 1]
****

Group: Members
Posts: 70
Joined: 14-April 05
Member No.: 5,653



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:

CODE
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
Go to the top of the page
 
+Quote Post
beeseven
post Apr 20 2005, 09:55 PM
Post #2


Privileged Member
*********

Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



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.
Go to the top of the page
 
+Quote Post
tariqrf
post Apr 21 2005, 06:46 AM
Post #3


Member [Level 1]
****

Group: Members
Posts: 70
Joined: 14-April 05
Member No.: 5,653



QUOTE(beeseven @ Apr 20 2005, 09:55 PM)
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.
*





CODE
<?

$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???
Go to the top of the page
 
+Quote Post
Argoth
post Apr 21 2005, 12:54 PM
Post #4


Newbie [Level 2]
**

Group: Members
Posts: 29
Joined: 6-April 05
Member No.: 5,318



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)
Go to the top of the page
 
+Quote Post
serverph
post Apr 21 2005, 02:40 PM
Post #5


Ancient Enigma
Group Icon

Group: [MODERATOR]
Posts: 1,771
Joined: 11-July 04
From: under the stars
Member No.: 76



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. smile.gif

if it has been working with tripod before, there's no reason it wouldn't run with trap17 too.
Go to the top of the page
 
+Quote Post
tariqrf
post Apr 22 2005, 07:36 AM
Post #6


Member [Level 1]
****

Group: Members
Posts: 70
Joined: 14-April 05
Member No.: 5,653



COOL!! IT WORKS!! i really donno what i did, but it finally works!!

omg,

Thanx guyz,
T.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Mysql Database Setup : Setting Up Mysql Database(6)
  2. Could Someone Make A Php Script For Me?(3)
  3. Complete Login System(57)
  4. Web Surfing- Script Needed(2)
  5. Increment A Mysql Column(7)
  6. Import From Excel File Into Mysql Database(9)
  7. Delay X Seconds In Flash(1)
  8. Verifying Email Addresses(9)
  9. Subquery In Mysql(5)
  10. Watermark Your Image With Simple Php Script(35)
  11. Background Image Swap Script(15)
  12. Invite Script..(2)
  13. Loaing Script(3)
  14. Php Downloads Script(4)
  15. Login Script For Vbulletin.(9)
  1. Mysql, Php, Apache Downloads And Setup Was A Nightmare(10)
  2. Guessing Php Script(2)
  3. Phpizabi Social Network Script(1)
  4. Php Guest Online Script(3)
  5. How To Make Php Newsletter Script(3)
  6. It Went Well For A While(5)
  7. Browser Compatibility Problem With Firefox - Javascript + Css(3)
  8. Seeking Help With Javascript(1)
  9. Mysql Db Is Down Getting Following Error(2)
  10. Need Advice On Setting Up Mysql Database.(3)
  11. The Only Reason I Choose Ms Sql Server Rather Than Mysql(0)
  12. Mysql Database Not Working(3)
  13. Creating A Php Login System Using Mysql(9)


 



- Lo-Fi Version Time is now: 7th September 2008 - 12:15 PM