Web hosting domain names - 336 CHAPTER 11 MODIFYING PHPBB Listing 11-1.
336 CHAPTER 11 MODIFYING PHPBB Listing 11-1. Defining SQL for Different Database Systems switch(SQL_LAYER) { case ‘postgresql’: $sql . . . break; case ‘oracle’: $sql . . . break; case ‘mysql’: case ‘mysql4′: default: $sql . . . break; } This ability to check the SQL_LAYER is quite useful if you need to define SQL statements that vary from database to database. Table 11-2 lists the various possible SQL_LAYER values supported by phpBB 2.0. Table 11-2. Supported SQL_LAYER Values in phpBB 2.0 SQL_LAYER Value Corresponding Database mysql MySQL 3.x mysql4 MySQL 4.x postgres PostgreSQL mssql Microsoft SQL Server, no ODBC oracle Oracle msaccess Microsoft Access database mssql-odbc Microsoft SQL Server using an ODBC connection In most cases, modified SQL is not necessary. Most people do not have access to testing their SQL code against all the databases phpBB supports; this is why a lot of hacks only claim to work on MySQL, as they are largely untested on other systems. The hacks presented here are tested only on MySQL, which is the database you have been using for the examples in this book.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.