Portal Home > Knowledgebase > Articles Database > SQL help needed


SQL help needed




Posted by freshjada, 12-07-2007, 05:06 PM
Need some SQL database configuration help. $crishn = mysql_connect($db_host, $db_user, $db_pass); $crashn = mysql_select_db($db_name); I have to change the above but not sure what is what , can anyone help ?? my database name - atencorps username-Minolta pass-Sandy atencorp_atencorps. I believe I should just delete "name" and replace with "atencorps" I believe I should just delete "user" and replace with "minolta" I believe I should just delete "pass " and replace with "sandy" is that correct ?? also what goes in the section "Host " ??

Posted by Xeentech, 12-07-2007, 05:11 PM
probly better just to leave the variables and set their values..

Posted by cheyenne1212, 12-07-2007, 05:47 PM
Unless this is a script you found and uploaded.. If you don't see in the file your in right now, look for a config.php file somewhere...that will most likely include the the variables as well.

Posted by freshjada, 12-07-2007, 06:36 PM
Where am I going wrong ?? ok, I get the following error at the top of the homepage Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/atencorp/public_html/vars.php on line 16 Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/atencorp/public_html/vars.php on line 17 Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/atencorp/public_html/vars.php on line 17 -------------------------What I see on the mysql database section of Cpanel ------------ Database Size Users Actions atencorp_atencorps 0.00 MB atencorp_aboni Delete Database --------------Top 17 lines of Var.php---------------

Posted by jstanden, 12-07-2007, 07:48 PM
Chances are you wanted string literals and not variables: "atencorp_atencorps" not $db_atencorp_atencorps (with quotes). Even more practical is using variables as others described above:

Posted by freshjada, 12-07-2007, 08:37 PM
taken the $db out and it seems to have removed the errors. so thanks guys



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
1 Year We3Cares Review (Views: 897)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.