set .@menu$,"";
for( set .@i, 1; .@i <= 39; set .@i, .@i+1 ) {
query_sql("SELECT `guild_id` FROM `house` WHERE `house_id` = '" + .@i + "'", .@check);
if ( .@check ) {
set .@menu$, ""+ .@menu$ +"House No. [^006633" + .@i + "^000000] - [^FF0000Reserved^000000]";
} else {
set .@menu$, ""+ .@menu$ +"House No. [^006633" + .@i + "^000000] - [^006633Empty^000000]";
}
set .@menu$, .@menu$ + ":";
}
CREATE TABLE IF NOT EXISTS `house` (
`house_id` tinyint(11) unsigned NOT NULL default '0',
`guild_id` smallint(11) unsigned NOT NULL default '0',
`guild_name` varchar(30) NOT NULL default '',
`htime` tinyint(11) unsigned NOT NULL default '0',
`mtime` tinyint(11) unsigned NOT NULL default '0',
`stime` tinyint(11) unsigned NOT NULL default '0',
`day` tinyint(11) unsigned NOT NULL default '0',
`mount` tinyint(11) unsigned NOT NULL default '0',
`year` smallint(11) unsigned NOT NULL default '0',
PRIMARY KEY (`house_id`)
) ENGINE=MyISAM;
Hi all
I'm doing the rental house but have problem about menu which use for loop work together
but i get error when house no. 10+ was reserved
how to fix it?
thank you