haXe Forum > Mysql
-
Xlo66 Mar 15 at 18:16
Hello, i have a news problems, i have to message error =>
./Db.hx:3: characters 26-27 : Unexpected =
And my Db.hx =>
class Db { var connection:Connection = php.db.Mysql.connect( params : { user : "root", socket : "null", port : 3306, pass : "mypassword", host : "localhost", database : "hox" } ); var rs:ResultSet = connection.request( sql : "mysql" ); connection.close(); }
Where is error? oO please -
Ali Jaya Meilio Mar 16 at 06:52
hmmm i think the error is when you pass a parameter to a function.
this
var connection:Connection = php.db.Mysql.connect(
params : {
user : "root",
socket : "null",
port : 3306,
pass : "mypassword",
host : "localhost",
database : "hox"
} );must be
var connection:Connection = php.db.Mysql.connect(
{
user : "root",
socket : "null",
port : 3306,
pass : "mypassword",
host : "localhost",
database : "hox"
} );it just a syntax error ;)
-
Xlo66 Mar 16 at 07:16
Thanks thanks =)
< Prev
| Page 1 / 1 |
Next >