ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:axmls:setprefix

This is an old revision of the document!


setPrefix

Syntax
boolean setPrefix (
  string $prefix = ''
  optional bool $addUnderscore=true
  )

Description

Sets a prefix for database objects

Call this method to set a standard prefix that will be prepended to all database tables and indices.

If the optional $addUnderscore parameter is set, an underscore is automatically appended to the prefix.

Usage

/*
* Assuming xml schema contains tables a,b,c
*/
$axmls->setPrefix('test');
 
/*
* tables will be created as 'test_a','test_b','test_c'
*/
 
$axmls->setPrefix('test',false);
 
/*
* tables will be created as 'testa','testb','testc'
*/
v5/axmls/setprefix.1450540718.txt.gz · Last modified: 2017/04/21 11:22 (external edit)