Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 03-12-2005, 04:13 PM Stupid question...
feraira's Avatar
BeTheBand!

Posts: 350
Trades: 0
Why can't I connect to my database? The code I have is:

Code:
mysql_connect(localhost,USERNAME,PASSWORD);
		mysql_select_db("sitev2") or die("Unable to select database");

			
$result = mysql_query("SELECT * FROM info order by title DESC");
		while ($row = mysql_fetch_array($result)) {
Where USERNAME and PASSWORD = The DB username and password...

I get the following error:

Warning: mysql_connect(): Access denied for user: 'sitev2@localhost' (Using password: YES) in /home/xingeh/public_html/new/info2.php on line 11
Unable to select database
feraira is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-12-2005, 05:27 PM
feraira's Avatar
BeTheBand!

Posts: 350
Trades: 0
lol... ok problem over! i realised i had the username wrong, i forgot to put the username prefix infront... pretty dumb eh?
feraira is offline
Reply With Quote
View Public Profile
 
Old 03-12-2005, 05:32 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
It's not dumb, sometimes it's the little things that get ya. It happens to all of us. I'm glad you figured it out though.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 03-12-2005, 08:51 PM
Bloodsyne's Avatar
Skilled Talker

Posts: 52
Trades: 0
Heh, for emphasis: 95% of the time it's a small, insignificant (or seemingly so) detail that catches you off-guard and causes the most complexing of errors.

I learned that early on, and it still plagues me today. :|
Bloodsyne is offline
Reply With Quote
View Public Profile
 
Old 03-12-2005, 09:06 PM
dan245's Avatar
Skilled Talker

Posts: 59
Location: Massachusetts, USA
Trades: 0
Hey I make the same mistakes all the time, too! No one is perfect
dan245 is offline
Reply With Quote
View Public Profile
 
Old 03-13-2005, 03:21 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
I had a script come crashing down around my ears the other day 'cos I typed in a single additional comma.....
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 03-13-2005, 10:32 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
feraira, I'll echo what the others have said -- don't be too hard on yourself. It's just part of writing code. Anyone who says they've never done it or been aggrevated by it isn't being truthful. No sweat.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 03-13-2005, 11:01 AM
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
It's time to recall the dumbest mistakes by WTers
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 03-13-2005, 01:52 PM
feraira's Avatar
BeTheBand!

Posts: 350
Trades: 0
lol thanks for the confidence i got another problem now tho lol, look in my other topic ... "Small Problem" if you would be so kind
feraira is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Stupid question...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34654 seconds with 12 queries