You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connects to a database, returns handle to database connection. If you want to connect to multiple databases, you can call this function up to 4 times. Do not forget to close connection with `mysql_close()`. TODO: link here!
14
+
Connects to a database, returns handle to database connection. If you want to connect to multiple databases, you can call this function up to 4 times. Do not forget to close connection with [mysql_close()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_closehandle). TODO: link here!
15
15
16
16
If "localhost" passed as `host`, for *NIX OS will be changed to "127.0.0.1".
Send a query to a database and saves the result for use in following functions. Must be called after `mysql_real_connect()`.
31
+
Send a query to a database and saves the result for use in following functions. Must be called after [mysql_real_connect()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_real_connectstr-host-str-user-str-passwd-str-db-int-port3306).
32
32
33
33
Usage example: `mysql_query(handle, "SELECT * from users");`
34
34
35
35
#### `mysql_num_rows(<handle>)`
36
36
37
-
Returns the amount of rows received after latest query. Must be called after `mysql_real_connect()` and `mysql_query()`.
37
+
Returns the amount of rows received after latest query. Must be called after [mysql_real_connect()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_real_connectstr-host-str-user-str-passwd-str-db-int-port3306) and [mysql_query()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_queryhandle-str-query).
Returns the amount of affected rows after latest query. Must be called after `mysql_real_connect()` and `mysql_query()`.
43
+
Returns the amount of affected rows after latest query. Must be called after [mysql_real_connect()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_real_connectstr-host-str-user-str-passwd-str-db-int-port3306) and [mysql_query()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_queryhandle-str-query).
Returns number of fields in latest query result. Must be called after `mysql_real_connect()` and `mysql_query()`.
49
+
Returns number of fields in latest query result. Must be called after [mysql_real_connect()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_real_connectstr-host-str-user-str-passwd-str-db-int-port3306) and [mysql_query()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_queryhandle-str-query).
Returns next row from latest query result as array. Array's keys are equal to column names and can be found with `getArrayKeys(<array>)`. An empty array returned if there's no more rows left. Must be called after `mysql_real_connect()` and `mysql_query()`.
55
+
Returns next row from latest query result as array. Array's keys are equal to column names and can be found with `getArrayKeys(<array>)`. An empty array returned if there's no more rows left. Must be called after [mysql_real_connect()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_real_connectstr-host-str-user-str-passwd-str-db-int-port3306) and [mysql_query()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_queryhandle-str-query).
56
56
57
57
Usage example:
58
58
```
@@ -67,7 +67,7 @@ for(j = 0; j < keys.size; j++)
67
67
### Non-MySQL Related Functions
68
68
#### `mysql_fetch_rows(<handle>)`
69
69
70
-
Returns all rows from latest query result as 2-dimensional array. Array's keys are equal to column names and can be found with `getArrayKeys(<array>)`. An empty array returned if there's no more rows left. Must be called after `mysql_real_connect()` and `mysql_query()`.
70
+
Returns all rows from latest query result as 2-dimensional array. Array's keys are equal to column names and can be found with `getArrayKeys(<array>)`. An empty array returned if there's no more rows left. Must be called after [mysql_real_connect()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_real_connectstr-host-str-user-str-passwd-str-db-int-port3306) and [mysql_query()](https://github.com/callofduty4x/mysql/blob/master/README.md#mysql_queryhandle-str-query).
0 commit comments