bradio10 Posted January 4, 2015 Share Posted January 4, 2015 Not sure whether I should post this here or in the tutorials section, but can someone make a tutorial on tables? I've been trying to work with table for storing stuff in (i am wanting to make an inventory system) and I just find tables to be really confusing. But like, a tutorial where you get data from like an SQL server or something and you put that data into the table, then like get data from the table as well. Mostly just getting specific data from tables is what I am confused about, like if I want to get a particular item from a table and change its amount value, then save that change back into the table, thats what I am confused on. So ye, if someone could make a table tutorial or explain all that even in this topic, I'd be very thankful! Thanks. Link to comment
TrapLord Studios™ Posted January 4, 2015 Share Posted January 4, 2015 You have to use strings such as mysql_query mysql_free_result Link to comment
bradio10 Posted January 4, 2015 Author Share Posted January 4, 2015 You have to use strings such as mysql_query mysql_free_result Are these on the wiki? If so, can you please link them for me? Thanks! Link to comment
Anubhav Posted January 4, 2015 Share Posted January 4, 2015 Use the db functions. They're better for me. Link to comment
bradio10 Posted January 4, 2015 Author Share Posted January 4, 2015 I know how to use most of the db functions (insert, create, update, delete, etc), but I don't know how to put all the data into a table, then use the table to change data instead of always having to change it through SQL (which im guessing is more resource intensive than using tables right?) Link to comment
TrapLord Studios™ Posted January 4, 2015 Share Posted January 4, 2015 mysql_query mysql_free_result Link to comment
bradio10 Posted January 4, 2015 Author Share Posted January 4, 2015 mysql_querymysql_free_result Thanks, so what do all these functions do? Like, what is the difference between these functions and the normal db functions? And how do I put data taken from the SQL into a table for each player? Link to comment
TrapLord Studios™ Posted January 4, 2015 Share Posted January 4, 2015 These aren't functions, they are strings/operations, go through them on the mysql section on the wiki. The use of each would be provided there aswell. Link to comment
bradio10 Posted January 4, 2015 Author Share Posted January 4, 2015 Ok, thanks for that. Now, can anybody provide an example or something of how I could manipulate data in a table that has had data added to it by an SQL query? Even if anybody knows of any free resources that use a method like this that is easy to understand, I am willing to take a look at that. thanks. Link to comment
MTA Team botder Posted January 4, 2015 MTA Team Share Posted January 4, 2015 These are functions and not "strings/operations". Where did you learn that nonsense? Anyway, after connecting to a MySQL database you can use the function mysql_query function to manipulate the database with the SQL language. http://www.w3schools.com/sql/default.asp Examples: SELECT * FROM `table_name` WHERE `serial`='...' LIMIT 1; UPDATE `table_name` SET `money`=5000, `level`=5, `nick`='Test' WHERE `serial`='...'; INSERT INTO `table_name` (`serial`, `money`, `level`) VALUES ('...', 5000, 3); Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now