[Tutorial] MySQL for beginners!
#2

pawn Code:
new string[256];
format(string,sizeof(string),"UPDATE `users` SET `fieldname` = '%s' WHERE `username` = '%s'",string to update);
mysql_query(string);
In MySQL, you're obviously going to need to create large strings for queries, but you shouldn't specify examples of bad practice, seeing as that is an extremely small/minor query, you should really refrain from using 256-cell strings (4 bytes per cell... 1024 bytes per messy string).
Reply


Messages In This Thread
MySQL for beginners! - by Faraday - 08.09.2010, 20:46
Re: MySQL for beginners! - by Calgon - 08.09.2010, 21:10
Re: MySQL for beginners! - by DiddyBop - 08.09.2010, 21:13
Re: MySQL for beginners! - by [L3th4l] - 08.09.2010, 23:07
Re: MySQL for beginners! - by playbox12 - 09.09.2010, 19:24
Re: MySQL for beginners! - by Faraday - 09.09.2010, 21:01
MySQL for beginners! - by [NoV]LaZ - 09.09.2010, 21:10
Re: MySQL for beginners! - by Mr.Jvxmc - 04.01.2011, 11:23
Re: MySQL for beginners! - by bartje01 - 11.06.2011, 23:56
Re: MySQL for beginners! - by Lorenc_ - 12.06.2011, 00:05

Forum Jump:


Users browsing this thread: 1 Guest(s)