This is a discussion on no database selected within the PHP General forums, part of the PHP Programming Forums category; I am using this to connect remotely but I get a no database selected error. The table is contacts but ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am using this to connect remotely but I get a no database selected error.
The table is contacts but there is not a parameter for database name according to the documentation. How do I delect my database when conencting this way? $link = mysql_connect('xxxx.org:3306', 'my_username', 'mypass'); echo 'Connected successfully'; $query = "SELECT * FROM contacts"; |
|
|||
|
Ross wrote:
> I am using this to connect remotely but I get a no database selected error. > The table is contacts but there is not a parameter for database name > according to the documentation. How do I delect my database when conencting > this way? > > $link = mysql_connect('xxxx.org:3306', 'my_username', 'mypass'); > > echo 'Connected successfully'; > > $query = "SELECT * FROM contacts"; mysql_select_db('db_name', $link); -- :o) Hasse R. Hansen ramlev.dk |