Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
_createPreferencesTable.php
Go to the documentation of this file.
1 <?php
8  $res = mysql_query(
9  "create table if not exists `dataface__preferences` (
10  `pref_id` int(11) unsigned not null auto_increment,
11  `username` varchar(64) not null,
12  `table` varchar(128) not null,
13  `record_id` varchar(255) not null,
14  `key` varchar(128) not null,
15  `value` varchar(255) not null,
16  primary key (pref_id),
17  index `username` (`username`),
18  index `table` (`table`),
19  index `record_id` (`record_id`))", df_db());
20  if ( !$res ) throw new Exception(mysql_error(df_db()), E_USER_ERROR);
21 
22 }