# \[Select Failed - count\] error from Tutorial "Login Using Flash MX, PHP, and MySQL"

**URL:** https://forum.kirupa.com/t/select-failed-count-error-from-tutorial-login-using-flash-mx-php-and-mysql/57949
**Category:** programming
**Created:** [July 18, 2004, 7:14am UTC](https://forum.kirupa.com/t/select-failed-count-error-from-tutorial-login-using-flash-mx-php-and-mysql/57949 "2004-07-18T07:14:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![obiAdmin](https://avatars.discourse-cdn.com/v4/letter/o/67e7ee/32.png) [@obiAdmin](https://forum.kirupa.com/u/obiAdmin)
#### Post date: [July 18, 2004, 7:14am UTC](https://forum.kirupa.com/t/select-failed-count-error-from-tutorial-login-using-flash-mx-php-and-mysql/57949/1 "2004-07-18T07:14:43Z")

</div>

I just recently used the Tutorial [size=4][color=#003366] **Login** Using Flash MX, PHP, and MySQL, [/color][size=2][color=#000000]but after hooking everything up, I found I was getting this error…  
[/color][/size][/size]  
[size=4][size=2][color=#000000]Select Failed - count… looking at the coding from the PHP file, I noticed that the coding had the alter code if failed, but when looking at it, I have not a clue to what is wrong.

\<?  
$queryb=“SELECT COUNT(_) FROM auth";  
mysql\_connect(“[mysql.server.com](http://mysql.server.com)”,“name”,“password”)  
or die(“Unable to connect to SQL server”);  
mysql\_select\_db(“database”) or die(“Unable to select database”);  
$numusers=mysql\_query($queryb) or die (“Select Failed - count”);  
$numuser=mysql\_fetch\_array($numusers);  
?\>[/color][/size][/size]  
[size=4][size=2][color=#000000][/color][/size][/size]  
[size=4][size=2][color=#000000] I did not put in the server name, name, password, etc. for protection purposes, but, looking at the variable $queryb="SELECT COUNT(_) FROM auth”, that is not working… is it because I don’t have this SQL table in the right place in my site? I thought it was in the mysql file, but I could be wrong… please help, Thank You in return…[/color][/size][/size]  
[size=4][size=2][color=#000000][/color][/size][/size]  
[size=4][size=2][color=#000000](coding of the table)[/color][/size][/size]  
[size=4][size=2][color=#000000][/color][/size][/size]  
[size=4][size=2][color=#000000]CREATE TABLE auth (  
userid  
int(4)  
unsigned  
zerofill  
DEFAULT ‘0000’  
NOT NULL  
auto\_increment,  
username varchar(20),  
userpassword varchar(20),  
PRIMARY KEY (userid)  
);[font=Arial]  
[/font]  
[/color][/size][/size]
