Where clause from multi value fields

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 3, 2012   (RSS)

Re: [orazio] Where clause from multi value fields

By mbareara - August 3, 2012

ok solved :D

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php


// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/calciocatania/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($stagioniRecords, $stagioniMetaData) = getRecords(array(
'tableName' => 'stagioni',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$stagioniRecord = @$stagioniRecords[0]; // get first record

// load records
list($giocatoriRecords, $giocatoriMetaData) = getRecords(array(
'tableName' => 'giocatori',
'where' => "stagione LIKE '%\t".intval($stagioniRecord['num'])."\t%'",
'orderBy' => 'cognome ASC',

));

?>

Re: [orazio] Where clause from multi value fields

By Jason - August 3, 2012

Hi,

Glad to hear this is working for you now. Let us know if you have any other questions.

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/