MySQL cache
#5

Код:
cache_get_value_int(row, column_name, &destination);
That function is to assign integer value returned from sql query into a variable.

Example, you have a query that returns these 2 rows.
Код:
+--------+----------+
| id     | name     | <!---- column/fields
+--------+----------+
|      1 | Fineman  | <!---- row 0
|      2 | Finemann | <!---- row 1
+--------+----------+

new value;
cache_get_value_int(0, "id", value); // This code will assign the value from "id" column at row 0 to "value" variable
printf("%d", value); // Output will be 1
cache_get_value_int(1, "id", value); // This code will assign the value from "id" column at row 1 to "value" variable
printf("%d", value); // Output will be 2
More explanation: https://sampwiki.blast.hk/wiki/MySQL/R40
Reply


Messages In This Thread
MySQL cache - by Micko123 - 08.11.2016, 07:23
Re: MySQL cache - by MerryDeer - 08.11.2016, 07:30
Re: MySQL cache - by Micko123 - 08.11.2016, 07:32
Re: MySQL cache - by Micko123 - 08.11.2016, 07:39
Re: MySQL cache - by X337 - 08.11.2016, 07:57
Re: MySQL cache - by Micko123 - 08.11.2016, 07:59
Re: MySQL cache - by F1N4L - 08.11.2016, 09:20
Re: MySQL cache - by Konstantinos - 08.11.2016, 09:24
Re: MySQL cache - by X337 - 08.11.2016, 09:24
Re: MySQL cache - by Micko123 - 08.11.2016, 09:40

Forum Jump:


Users browsing this thread: 2 Guest(s)