Can anybody be good and post all the work of MySQL?
I mean all the functions and what does it do and its syntax
And most important:
Tell me how to create a table/database using MySQL, like we use QuerySQL, like that, how to use it in MySQL
MySQL functions
these are the functions:
mysql_connect( szHost, szUsername, szPassword, szDatabase, iPort )
mysql_close( pConnection )
mysql_query( pConnection, szQuery )
mysql_num_rows( pResult )
mysql_num_fields( pResult )
mysql_fetch_row( pResult )
mysql_fetch_assoc( pResult )
mysql_fetch_lengths( pResult )
mysql_free_result( pResult )
mysql_errno( pConnection )
mysql_error( pConnection )
mysql_ping( pConnection )
mysql_escape_string( pConnection, szString )
mysql_select_db( pConnection, szDatabase )
mysql_change_user( pConnection, szUser, szPassword )
mysql_warning_count( pConnection )
mysql_affected_rows( pConnection )
mysql_insert_id( pConnection )
mysql_info( pConnection )
Have you looked in the tutorials (http://forum.vc-mp.org/index.php?board=9.0) section? Have you googled (http://lmgtfy.com/?q=mysql+free+video+tutorials)? Have you looked at any documentation (https://dev.mysql.com/usingmysql/get_started.html)? What makes you think that our tutorials will be any different than the existing ones (http://freevideolectures.com/Course/3179/MySQL-Database)?
No offense but you know what's my advice to any programmer that can't document on his own? Go find another hobby!
SO
mysql_query( pConnection, szQuery )
This is used to create database right?
That's used to execute a query. If that query makes a table, yes.
A database should already exist, since you'd need that in the connect statement.
if the database doesn't exist, then??
and can u update the wiki?
I can get much info from there
I want SQL and MySQL in wiki, can anybody update it?
I'll suggest you to stick with SQLite, you can't manage MySQL.
Doom is right Mysql is not kinda easy its very difficult to know it better use Sqlite
Quote from: KAKAN on Aug 18, 2015, 08:40 AMif the database doesn't exist, then??
Can't u just answer me?
And
@FinchDon plz don't post on it, until unless u have something to tell
What do you expect SQLite to do when you don't have your so called "db" defined and you try to call it in QuerySQL... If you don't understand this then I guess its pointless to help onward.
Quote from: Doom_Killer on Aug 18, 2015, 02:26 PMWhat do you expect SQLite to do when you don't have your so called "db" defined and you try to call it in QuerySQL... If you don't understand this then I guess its pointless to help onward.
He's talking about MySQL, not SQLite. And he's talking about an actual database, not the db variable that will hold the pointer.
If you don't know how to create a mysql database you're better off using SQLite.
Yus, idk how to create a MySQL database, and i want to learn it.
Quote from: Thijn on Aug 18, 2015, 03:50 PMQuote from: Doom_Killer on Aug 18, 2015, 02:26 PMWhat do you expect SQLite to do when you don't have your so called "db" defined and you try to call it in QuerySQL... If you don't understand this then I guess its pointless to help onward.
He's talking about MySQL, not SQLite. And he's talking about an actual database, not the db variable that will hold the pointer.
If you don't know how to create a mysql database you're better off using SQLite.
I'm talking about SQLite because MySQL is almost same, so that's a stupid question that what will happen when there is no database at all...
Since he used SQLite before I'm trying to maake him realize that its not that different.
Quote from: Doom_Killer on Aug 18, 2015, 04:39 PMQuote from: Thijn on Aug 18, 2015, 03:50 PMQuote from: Doom_Killer on Aug 18, 2015, 02:26 PMWhat do you expect SQLite to do when you don't have your so called "db" defined and you try to call it in QuerySQL... If you don't understand this then I guess its pointless to help onward.
He's talking about MySQL, not SQLite. And he's talking about an actual database, not the db variable that will hold the pointer.
If you don't know how to create a mysql database you're better off using SQLite.
I'm talking about SQLite because MySQL is almost same, so that's a stupid question that what will happen when there is no database at all...
Since he used SQLite before I'm trying to maake him realize that its not that different.
There's a big difference since SQLite will create the database if it doesn't exist and mysql will not. Which is why KAKAN is struggling.
Quote from: KAKAN on Aug 18, 2015, 04:03 PMYus, idk how to create a MySQL database, and i want to learn it.
Where do you host your MySQL server. It should have something called PhpMyAdmin. Login using that, then create a new database and user.
I usually create an user, and select I want to create a database with the same name. That way you don't have to fiddle with permissions.
Okay, I'll try it
I was talking about the functions, but anyway, Kakan you have to setup things, create a user, setup database and then connect it. Seems hard, but it isn't.
Tried and it worked, Thanks
@Thijn nd
@Doom_Killer for ur help