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 05-19-2005, 10:14 AM cpanel ?
Novice Talker

Posts: 6
Trades: 0
i have created a database for a scheduler and im having a realy hard time with cpanel

what is the exact info(db name,user,pass,localhost)

here is an old one.
how does this work?

pat_work

Users in work
pat_techker5 (Privileges: ALL PRIVILEGES)

Connection Strings
Perl $dbh = DBI->connect("DBI:mysqlat_work:localhost","pat_techk er5","<PASSWORD HERE>");
PHP $dbh=mysql_connect ("localhost", "pat_techker5", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("pat_work");
techker is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-19-2005, 10:27 AM Database Selection
webmasterjunkie's Avatar
Average Talker

Posts: 20
Location: Maryland
Trades: 0
Not sure what exactly you are looking for, but I hope this helps. Substitute the words in red for the values that pertain to you. This will select a database, table & fields, then stor the info into your variables.

$db_connection = mysql_connect ("localhost", "username", "password") OR die (mysql_error());
$db_select = mysql_select_db ("database") or die (mysql_error());
$query = "SELECT * FROM table";
$result = mysql_query($query) or die("Error: " . mysql_error());
while($row = mysql_fetch_array($result)){
$whatever= $row['whatever'];
}
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
webmasterjunkie is offline
Reply With Quote
View Public Profile Visit webmasterjunkie's homepage!
 
Old 05-19-2005, 11:01 AM
Novice Talker

Posts: 6
Trades: 0
thx but what i want to know is what is my db name

user

pass
techker is offline
Reply With Quote
View Public Profile
 
Old 05-19-2005, 11:14 AM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
Your database name would be pat_work
Are you having trouble logging into the database?

If you've got your database created and a user created. Make sure you also add the user to the database. This step often gets overlooked.

There should a section that looks something like this:
Add <USERNAME> to <DATABASE>
the <username> and <database> will be dropdown lists.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 05-19-2005, 11:22 AM
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
I guess thats what you want just insert your password were i have Colour red.

$db_connection = mysql_connect ("localhost", "Pat_tricker5", "password") OR die (mysql_error());
$db_select = mysql_select_db ("Pat_work") or die (mysql_error());
$query = "SELECT * FROM table";
$result = mysql_query($query) or die("Error: " . mysql_error());
while($row = mysql_fetch_array($result)){
$whatever= $row['whatever'];
}
__________________
Life is just lyke a school where everybody goes to learn one or two thing. the more u school, the more u learn more about school..The more we live our lifes.. the more we learn more about life.

Please login or register to view this content. Registration is FREE

Last edited by Uche; 05-19-2005 at 11:27 AM..
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
Reply     « Reply to cpanel ?
 

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 3.27894 seconds with 12 queries