Several tables added?
Several tables added?
sky
Posts: 2Questions: 0Answers: 0
I change some of the code of server_processing to allow relations between foreign key and primary keys with several tables. Not affected normal queries. Are you interested viewing? maybe it's good enough to get included in the next version.
Sorry i didnt find other way to contact you.
Regards Me.
Sorry i didnt find other way to contact you.
Regards Me.
This discussion has been closed.
Replies
Allan
[code]<?php
/* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array( 'products_name', 'products_quantity', 'products_price', 'products_status', 'products_ordered' );
/* DB tables to use */
$aTables = array( 'products', 'products_description' );
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "products_id";
/* CONDITIONS */
$sWhere = "WHERE products.products_id=products_description.products_id ";
/* Database connection information */
$gaSql['user'] = "oscommerce";
$gaSql['password'] = "oscommerce";
$gaSql['db'] = "oscommerce";
$gaSql['server'] = "localhost";
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
/*
* Paging
*/
$sLimit = "";
if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )
{
$sLimit = "LIMIT ".mysql_real_escape_string( $_GET['iDisplayStart'] ).", ".
mysql_real_escape_string( $_GET['iDisplayLength'] );
}
/*
* Ordering
*/
$sOrder = "";
if ( isset( $_GET['iSortCol_0'] ) )
{
$sOrder = "ORDER BY ";
for ( $i=0 ; $i $iFilteredTotal,
"aaData" => array()
);
while ( $aRow = mysql_fetch_array( $rResult ) )
{
$row = array();
for ( $i=0 ; $i[/code]