General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 19th, 2004, 01:06 PM
oml oml is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 oml User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile SQL error after moving hosting company

My site has always worked fine up until now. I moved hosting company and transferred the site though it keeps returning the following error:

Warning: mysql_query(): 1 is not a valid MySQL-Link resource in /home/httpd/vhosts/{myurl}/httpdocs/include_site/include_db.php on line 46

Warning: mysql_error(): 1 is not a valid MySQL-Link resource in /home/httpd/vhosts/{myurl}/httpdocs/include_site/include_db.php on line 48

Warning: mysql_errno(): 1 is not a valid MySQL-Link resource in /home/httpd/vhosts/{myurl}/httpdocs/include_site/include_db.php on line 48
Error:Cannot execute query 'SELECT * FROM ffec_news ORDER BY DISPLAY_DATE DESC LIMIT 0,1'
SQL Error:
Error Number:

The database details are correct and it does actually pull info from the database though not without this error. My admin area for editing the pages via the web works fine and does not return any errors.

When executing the query " SELECT * FROM ffec_news ORDER BY DISPLAY_DATE DESC LIMIT 0,1 " manually the result returned is correct and without any errors.

This is from include_db.php (starting at line 43):

<?
function executeQuery( $query , &$link )
{
if ( !$result = mysql_query( $query, $link ) )
{
printError( "Cannot execute query '".$query."'<br>SQL Error: ".mysql_error( $link )."<br>Error Number: ".mysql_errno( $link ) );
die;
}
else
{
return $result;
}
}
?>






As i said, my site works fine on my original hosting though now it is hosted with simply.com it just returns errors.

Anyone able to shed some light on this?

Thank you in advance....

Reply With Quote
  #2  
Old July 19th, 2004, 02:38 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Did you change the host/username/password? Seems like a no-brainer, but it doesn't hurt to ask. Having this info wrong is the most common cause of the problem you're pointing out. Compare your admin area code to the breaking code and see if you can find the discrepancy.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
  #3  
Old July 19th, 2004, 04:51 PM
oml oml is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 2 oml User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
details are fine.... as i said, it does connect though always produces the errors.

it is very strange...

Reply With Quote
  #4  
Old July 19th, 2004, 08:10 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Maybe your new host has the error threshold set higher than your old host. Try adding an @ sign to the beginning of all database calls to suppress warnings.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > SQL error after moving hosting company


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway