Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Joseph Edmonds  >  osCommerce Easypopulate File Create Class  >  demo.php  >  Download  
File: demo.php
Role: Example script
Content type: text/plain
Description: Demonstration
Class: osCommerce Easypopulate File Create Class
Create files for osCommerce Easypopulate
Author: By
Last change: changed the mysql query from my own db_query to the standard mysql_query
Date: 5 years ago
Size: 630 bytes
 

Contents

Class file image Download
require_once('classes/create_ep_class.php');
$filename = 'easypop.txt';
$ep = new create_ep($filename);

$query = mysql_query("select * from source");
while($p = mysql_fetch_assoc($query)){
    $row = $easypop->create_empty_row_array();
    $row['v_products_model'] = $p['code'];
    $row['v_products_name_1'] = $p['name'];
    $row['v_products_description_1'] = $p['description'];
    $row['v_manufacturers_name'] = $p['manufacturer']);
    $row['v_products_image'] = $p['image'];
    
    //categories
    $cats = explode('###', $p['catstring']);
    foreach($cats as $k=>$v){
        $num = $k+1;
        $row['categories_name_' . $num] = $v;
    }
    
}