Jump to content

MySQL Problems


Recommended Posts

Posted

Hey guys, can you help me with it?

It doesn't say me if connection was succesfull or failed and I tried registration script (mysql_insert_id) but doesn't work too.

This is my code:

  
     connection = mysql_connect("localhost", "root", "", "phis_db") 
        if ( not connection) then -- Connection failed 
            outputDebugString("Unable to connect to MySQL!") 
        else 
            mysql_close(connection) 
  

PHiS Project, another revolution =]

Posted

try this:

  
  
     connection = mysql_connect("localhost", "root", "", "phis_db") 
        if not (connection) then -- Connection failed 
            outputDebugString("Unable to connect to MySQL!") 
        else 
            mysql_close(connection) 
  

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Posted

I resolved my trouble just changing server, I was using wamp and I use xampp now.

But now there's another trouble the registration script.

PHiS Project, another revolution =]

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...