Converting this to MYSQL R7/cache?
#1

Well I was able to learn how to convert the other things (logging in, etc) But this is a bit confusing and I got no idea how to do it.

pawn Код:
stock GetFreeBizID()
{
    mysql_query("SELECT NULL FROM businesses");
    mysql_store_result();
    new rows = mysql_num_rows();
    mysql_free_result();
    return rows;
}
Anyone able to give me a hand?
Reply
#2

This typing of function won't work with the cache functions, technically.

You can use the latest version and use y_inline in order to make it work, though. I believe it would be something like this:

pawn Код:
inline Response()
{
    // query code
}

mysql_tquery(connectionHandle, "SELECT `value` FROM `table`", using inline Response, "", "");
Haven't done that in awhile though, so it could be wrong.
Reply
#3

I know it wont work, but how do I make it work? I'd prefer not using anything from the YSI library as I don't want to have to include the entire thing and make my script compile slower and bigger to get one thing done.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)