![]() |
|
#1
|
|||
|
|||
Help with Database ConnectionHi people. i can connect to my mySQL database server via this code below:
PHP Code:
I did it but some problems occured. index.php PHP Code:
PHP Code:
1046: No Database Selected. How can i do this ? Or i should use another way? (without class) Please help me. Thanks. |
|||
|
#2
|
||||
|
||||
|
Eric,
I am confused... I wouldn't READ my config.inc file usually but that's another story... Very quickly, this worked: mysql_select_db("mydb"); but this didn't: mysql_select_db("db");? Look at the different DB names, maybe it's just this typo in the name? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
noQuote:
no db may be another like mysql_select_db("ericdb"); |
|
#4
|
||||
|
||||
|
OK, try something like this instead...
PHP Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
|||
|
|||
yes,thanksThanks for help
config.inc PHP Code:
in index.php PHP Code:
Last edited by admin : 17-Jun-2004 at 08:35.
Reason: Please use [php] & [/php] for syntax highlighting of PHP code
|
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Clickable web-urls from database. | giobbi | MySQL / PHP Forum | 15 | 08-Jan-2008 05:18 |
| Parsing PHP code that's stored in a database. | JdS | MySQL / PHP Forum | 3 | 13-May-2004 10:15 |
| Macromedia DWMX and PHP MySQL setup | soulja90 | MySQL / PHP Forum | 1 | 17-Mar-2004 05:50 |
| Connection Problems | Scott013 | Apache Web Server Forum | 2 | 09-Feb-2004 16:11 |
| WInXp Apache database? | Ticoloco | Apache Web Server Forum | 1 | 27-Nov-2003 05:21 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The