Tonyk
|
Posted: 10/03/2003, 4:05 PM |
|
Using PHP + MySQL
I have successfully implemented a system using a multiple selection listbox.
I need to output records with field delimiters and the text content of the listbox (listbox entries are currently held in a pointer file with entry for the main record id and entry for the unique listbox text entries).
The output should be as shown using '|' as the field delimiter i.e.
field1|field2|lb1,lb2,lb3|field4 \n
Ideally this should be printed to a text file for downloading.
Is there any way that this can be done easily in CCS? I have not been able to find anything on this.
Any help very welcome.
Tony
|
|
|
Tonyk
|
Posted: 10/03/2003, 4:23 PM |
|
Checking the tutorials I may have found the answer.
function Tasks_ds_BeforeBuildSelect() {
global $Tasks;
$s_Project = CCGetParam("s_Project", "");
if (count($s_Project) > 0 AND is_array($s_Project)) {
foreach ($s_Project as $key => $value) {
if ($Projects != "") $Projects = $Projects.",";
$Projects = $Projects.$value;
}
if ($Tasks->ds->Where != "")
$Tasks->ds->Where .= " AND ";
if ($Projects != "")
$Tasks->ds->Where .= " tasks.project_id IN (".$Projects .")";
}
}
Which I should be able to modify! I Hope!
|
|
|
|