Jump to content

Problem With MYSQL


Recommended Posts

Hello everyone,
Okey, i dont know the reason of this error, but it does not let me make any query. When i use dbExec or dbQuery this error appear.

If anyone knows the solution would appreciate it
This is the error:
e7ezcg.jpg

and this is my code:

-- SERVIDOR LOCAL

local MYSQL_HOST = "localhost";
local MYSQL_DATABASE = "david";
local MYSQL_USER = "root";
local MYSQL_PASSWORD = "";

handler = dbConnect("mysql", "dbname = "..MYSQL_DATABASE..";host = "..MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD)

if handler then
outputDebugString("Se conecto correctamente a la database: "..MYSQL_DATABASE.."!",3, 0, 255,0)
else
outputDebugString("[ERROR] NO se conecto correctamente a la database: "..MYSQL_DATABASE.."!",1, 255, 0,0)
end



local insert = dbExec(handler, "INSERT INTO `personas` (`Codigo`, `Nombre`, `Telefono`) VALUES (`1`, `David`, `3194508697`)") -- The error is here

Thanks to all.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...