13.05.2017, 10:21
(
Последний раз редактировалось Tord; 13.05.2017 в 14:34.
)
I suggest you to read this first:
https://sampwiki.blast.hk/wiki/MySQL#mysql_query
It's necessary in all queries used without threading, to clear the cache after being used. In the first code snippet you posted, I can't see any active "Cache". Example of assigning cache to a variable:
. So first, get that sorted out - by deleting the cache when done.
In order to check the database - it seems your query is correct. Try with the cache stuff I mentioned and see if it solves your problem.
Secondly, if you want the reg to be above 1000 and below 10000 - do this:
This will always meet the criteria-
https://sampwiki.blast.hk/wiki/MySQL#mysql_query
It's necessary in all queries used without threading, to clear the cache after being used. In the first code snippet you posted, I can't see any active "Cache". Example of assigning cache to a variable:
PHP код:
new Cache:varname
varname = mysql_query.....
//when done with the operations, do this:
if(cache_is_valid(varname)
{
cache_delete(varname);
}
In order to check the database - it seems your query is correct. Try with the cache stuff I mentioned and see if it solves your problem.
Secondly, if you want the reg to be above 1000 and below 10000 - do this:
PHP код:
new registration= random(8999) + 1000