CREATE TABLE `config` ( `config_name` varchar(255) NOT NULL, `config_value` varchar(255) NOT NULL, PRIMARY KEY (`config_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `config` VALUES ('title', 'free-site'); INSERT INTO `config` VALUES ('domain', 'site.ru'); INSERT INTO `config` VALUES ('year', '2010');
<?php $sql=mysql_query("SELECT * FROM config"); while($arr=mysql_fetch_assoc($sql)){ echo'Config_name: '.$arr['config_name'].'<br/>'; echo'Config_value: '.$arr['convig_value'].'<br/>'; echo'----<br/>'; } ?>
LIMIT 1
$sql = mysql_query("SELECT * FROM `config` LIMIT 1");