Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-23-2013 05:43:41

lazarus42
Member
Registered: 11-22-2005
Posts: 29

Access table within custom shipping script?

Is it possible to access the contents of a particular field from an existing table from within a custom shipping script?

I used to use functionality like this in CCP5.1 in perl and wish to replicate it in CCP8 in php.

Does anyone have a code fragment they could share with me? Alternatively if it is not possible, please let me know.

Phill

Offline

 

#2 03-25-2013 07:55:44

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19874
Website

Re: Access table within custom shipping script?

Code:

$CORE_DB =& $this->quick_object('CORE_DB','core','CORE_DB_1');

$table = 'SOME_TABLE';
$sql = 'SOME_SQL_STATEMENT';

$result = $CORE_DB->sql_do(array('sql'    => $sql,  'table'  => $table, 'order'  => array('id' => 'ASC')));

foreach ($result as $num => $row) {

     //DO SOMETHING...

} // End of foreach statement.

Nick Hendler

Online

 

#3 03-25-2013 08:23:51

lazarus42
Member
Registered: 11-22-2005
Posts: 29

Re: Access table within custom shipping script?

Thanks, Nick

Offline

 

Board footer