This is a discussion on "help with my first learning database" within the Databases section. This forum, and the thread "help with my first learning database are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
help with my first learning database
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Is there something wrong with these?
Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using password: NO) in /home/(location)/index.php on line 10 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/(location)/index.php on line 11 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/(location)/index.php on line 12 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/(location)/index.php on line 15 Full NameNick NameSalary Please someone help me Last edited by geyids; Mar 16th, 2007 at 14:17. |
|
|
|
|||
|
Re: help with my first learning database
You haven't given your MySQL password (for the MySQL account called root) as the third parameter to mysql_connect, so you are being denied access to the database from withing the PHP. The other error messages are all the consequence of this failure.
You should probably use a different account to the root one to access your database, and you it's advisable to apply passowrds to all the MySQL accounts that you have. |
|
|||
|
Re: help with my first learning database
Im not root in the webserver im uploading my database to. if u dont mind pliz help me where im I supposed to put my password in this
|
|
||||
|
Re: help with my first learning database
|
|
|||
|
Re: help with my first learning database
OK i changed this line to
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/(mylocation)/index.php on line 15 Full NameNick NameSalary Did I make a mistake to replace "root" with my username? im not root in the server Last edited by geyids; Mar 16th, 2007 at 15:43. |
|
|||
|
Re: help with my first learning database
|
|
||||
|
Re: help with my first learning database
Remove ,$db from you mysql_query .... I'm pretty sure you don't need that.
And this
|
|
|||
|
Re: help with my first learning database
what do I have to "fix it in the while ( ) section too" sorry im a learner in both php and mysql. I've looked at the line and saw I dont have a ";" is that right?
|
|
||||
|
Re: help with my first learning database
Quote:
no ... a while loop doesn't have ; it's
Did you try what I suggested?!? |
|
|||
|
Re: help with my first learning database
This is the codes I have at present but they still aint working the error is the same...
...this is the error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/(mylocation)/index.php on line 15 Full NameNick NameSalary |
|
||||
|
Re: help with my first learning database
Did you try this!
|
|
|||
|
Re: help with my first learning database
ok wait will check on it then tell you thnx hope u r not tired with this silly learner
|
|
||||
|
Re: help with my first learning database
Quote:
|
|
|||
|
Re: help with my first learning database
I removed the
|
|
|||
|
Re: help with my first learning database
I got the solution. I asked the guy who opened the account for me and he told me the error was the db created was not called learndb but...! So I changed it and its working now. Thanx anyway for ur help i've learned alot
|
![]() |
| Tags |
| first database |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Learning php! | Monie | PHP Forum | 11 | Oct 4th, 2007 13:39 |
| CSS - Learning | Freelancer | Web Page Design | 10 | Nov 17th, 2006 14:30 |
| XML Code for transfering data from one SQL Server Database to another database | plolla | Other Programming Languages | 1 | Aug 3rd, 2006 18:37 |
| Learning PHP | ecntrc | PHP Forum | 14 | Nov 19th, 2005 05:05 |
| Learning ASP.... | courtjester | Classic ASP | 2 | Feb 6th, 2004 00:38 |