Couldn't select database table

Status
Not open for further replies.

fleuv53

New Member
Messages
6
Reaction score
0
Points
0
Hi,

I just tried to select a table by using php but it won't select the database table. I did checked my script, it must work!

Code:
$con = mysql_connect("$host", "$user", "$pass"); 
if (!$con)
{
  die('Could not connect: ' . mysql_error());
}
// here it stops
mysql_select_db("users", $con)or die("Couldn't select database table.");

.....

mysql_close($con);

so you can see my table name is users just like it says in phpmyadmin. Now I'm thinking am I wrong or is there something wrong in phpmyadmin.

Greetz,

- Fleuv
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
I don't see a database "users" in your account; I see one that is prefixed with your cpanel name, and then ends with _uee (cpanel_uee).
 

fleuv53

New Member
Messages
6
Reaction score
0
Points
0
found problem
db = *_uee
table = users

var's

$data=*_uee
$table=users

Changed: mysql_select_db("users", $con)or die("Couldn't select database table.");
To: mysql_select_db("$data", $con)or die("Couldn't select database table.");
 
Status
Not open for further replies.
Top