Jump to content

mysql connection + insert image


Recommended Posts

11 hours ago, Mr.Loki said:

You can use callRemote to access another server. The example shows you how.

if you are passing the image from within the server to the database you you have to convert the texture to pixels of the format you want dxConvertPixels then save it as a string within the database. I've never tried this but i think it should work. GL :thumbup:

I got that thanks , but ' callRemote ' I can access another server but how to access a specific db , like I have a script called Test1 and there's a db in the script called img.db , how to access this db ? from another server, provide an example please , I have seen the wiki already . I don't know if this is possible ? 

Link to comment

I don't believe you can externally access a database through the client via fetchRemote or callRemote unless you put that through a web-server run PHP code or a Lua-parsed server http file (https://wiki.multitheftauto.com/wiki/Resource_Web_Access).

An easier option would be to have the server serve the data by accessing and collecting the data directly from the database, and sending it through a event (preferable a latent one, that is, triggerLatentClientEvent) to the client.

Edited by MrTasty
Link to comment
34 minutes ago, MrTasty said:

I don't believe you can externally access a database through the client via fetchRemote or callRemote unless you put that through a web-server run PHP code or a Lua-parsed server http file (https://wiki.multitheftauto.com/wiki/Resource_Web_Access).

An easier option would be to have the server serve the data by accessing and collecting the data directly from the database, and sending it through a event (preferable a latent one, that is, triggerLatentClientEvent) to the client.

i know the mechanism already but this is what i wanted https://wiki.multitheftauto.com/wiki/Resource_Web_Access

thanks bro

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