I am trying to install an new script, but the script does not install a database prefix upon initial installation. MySQL database table names are of limited supply, so I really need to put a prefix on these tables. Here is the original installation script. I was told to modify this by the author: global $table; $table=array(); define('TABLE_PREFIX',''); $table['categories']=TABLE_PREFIX . 'categories'; $table['items']=TABLE_PREFIX . 'link'; $table['options']=TABLE_PREFIX . 'options'; $table['comments']=TABLE_PREFIX . 'comments'; $table['ratings']=TABLE_PREFIX . 'ratings'; $table['rating']=TABLE_PREFIX . 'rating'; $table['contacts']=TABLE_PREFIX . 'contacts'; $table['hits']=TABLE_PREFIX . 'hits'; $table['admin_area']=TABLE_PREFIX . 'admin_area'; $table['payments']=TABLE_PREFIX . 'payments'; How do I modify this so that I have a prefix on all of the tables installed??? HELP!!!
Replace TABLE_PREFIX with your prefix, let's say you would want vb_ as prefix you would have: $table['categories']= 'vb_' . 'categories'; or $table['categories']= 'vb_categories';
I tried both of your suggestions, but still no prefix. Am I supposed to change this too? $table=array(); define('TABLE_PREFIX','');
Actually, here is everything...what's missing? global $table; $table=array(); define('TABLE_PREFIX','vb_'); $table['categories']= 'vb_categories'; $table['link']='vb_link'; $table['options']='vb_options'; $table['comments']='vb_comments'; $table['ratings']='vb_ratings'; $table['rating']='vb_rating'; $table['contacts']='vb_contacts'; $table['hits']='vb_hits'; $table['admin_area']='vb_admin_area'; $table['payments']='vb_payments'; $table['mailreports']='vb_mailreports'; $table['mailtemplates']='vb_mailtemplates';