Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Can't Select Database =?, It works on my home PC
Feelay
post Feb 2 2008, 11:32 AM
Post #1


Kinda N00B
Group Icon

Group: Members
Posts: 230
Joined: 13-January 08
From: Sweden
Member No.: 27,579



Hey!

I've made a register script. It works on my home pc, but when I upload it to astahost, it don't work =/
This is the error meesage I am getting:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/feelay/public_html/regcheck.php on line 35
You Could Not Register Because Of An Unexpected Error.
Error: No database selected


I know the error is from the database.. But I don't know exactly how the astahost database works.. My username is feelay_myname
i think, and the databasename should be feelay_thedatabasename. But still it ain't working.
Go to the top of the page
 
+Quote Post
turbopowerdmaxst...
post Feb 2 2008, 12:59 PM
Post #2


Premium Member
Group Icon

Group: [HOSTED]
Posts: 392
Joined: 16-February 06
From: Kolkata, India
Member No.: 11,322



Have you granted appropriate permissions to the MySQL username feelay_myname on the database? If not, you can do this via the CPanel.
Go to the top of the page
 
+Quote Post
Feelay
post Feb 2 2008, 01:03 PM
Post #3


Kinda N00B
Group Icon

Group: Members
Posts: 230
Joined: 13-January 08
From: Sweden
Member No.: 27,579



Yes I have. the "All" checkbox is checked.
But still I can't select the database =/
Go to the top of the page
 
+Quote Post
sparkx
post Feb 2 2008, 02:49 PM
Post #4


Sparkx
Group Icon

Group: [HOSTED]
Posts: 355
Joined: 11-October 06
From: Dana Point, CA, USA
Member No.: 16,496



When I get this error it is often because of some invalid row() array. You might want to look around at your script on line 35 and see what mysql action is going on. If you absolutely cannot figure out what is going on I suggest you use this little tip. Press <enter> before and after the suspected mysql string. If it only moves down one line then you found your problem otherwise it is not the problem.

I think you get this error when you have look for the number of results in a database that does not exist. Common errors may be case sensitivity and incorrect spelling of database name.

Sorry I can't really suggest anything more other then look closely at your query and maby even post it here if you continue having errors.

Sparkx
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. What's Wrong With "my Assistant?(0)
  2. Database Disk Space Usage?(3)
  3. Web Space And Mysql Database(3)
  4. Database Priveleges Lost(2)


 



- Lo-Fi Version Time is now: 13th October 2008 - 08:58 PM