Login   Register  
PHP Classes
elePHPant
Icontem

File: config.inc.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ersin Güvenç  >  PHP Cat Nested Model Category Class  >  config.inc.php  >  Download  
File: config.inc.php
Role: Configuration script
Content type: text/plain
Description: configuration file
Class: PHP Cat Nested Model Category Class
Manage an hierarchy of categories stored in MySQL
Author: By
Last change: changed defines
Date: 6 years ago
Size: 825 bytes
 

Contents

Class file image Download
<?php
#############################################
# FIRST OF ALL CREATE SQL !! use SQL.sql file.
#############################################

## Mysql connection.....
$link mysql_connect("localhost","root","","nested_model") or die (mysql_error());
mysql_select_db("nested_model",$link) or die (mysql_error());
mysql_query("SET NAMES 'utf8'");

###########################################
# YOU CAN CONFIGURE TABLES AND FIELD NAMES!!
###########################################
// table
define ('TABLE_NAME''category');
// fields
define ('CAT_ID''cat_id');
define ('PARENT_ID''parent_id');
define ('CAT_NAME''cat_name');
define ('DSC''dsc'); //description..
define ('CAT_LINK''cat_link');
define ('LEFT''lft');
define ('RIGHT''rgt');
//define ('TOP', 'tp'); //deprecated !


?>