MultiSearch
50 posts by 11 authors in: Forums > CMS Builder
Last Post: August 14, 2012 (RSS)
By Dave - May 23, 2008
Thanks for the clarification. I checked again and see that problem. You only need this line once at the top:
$searchTables = array();
leave the first one and remove all the rest and it will search all your tables.
Hope that helps.
interactivetools.com
Re: [Dave] MultiSearch
By jposwald - May 23, 2008
Do I have to delete as is?:
<?php
require_once "/home/content/w/w/t/wwtrainingsk2/html/cmsAdmin/lib/viewer_functions.php";
$searchOptions = array();
$searchOptions['keywords'] = @$FORM['q'];
$searchOptions['perPage'] = "20";
$searchOptions['debugSql'] = "0"; $searchTables = array();
$searchTables['cursos_el_'] = array(
'viewerUrl' => 'EL_Listado_ver.php',
'titleField' => 'nombre',
'summaryField' => 'descripcion',
'searchFields' => array('nombre','descripcion'),
); $searchTables = array();
$searchTables['cursos_pr_'] = array(
'viewerUrl' => 'PR_Listado_ver.php',
'titleField' => 'nombre',
'summaryField' => 'descripcion',
'searchFields' => array('nombre','descripcion'),
);
$searchTables = array();
$searchTables['cursos_en_'] = array(
'viewerUrl' => 'EN_Listado_ver.php',
'titleField' => 'nombre',
'summaryField' => 'descripcion',
'searchFields' => array('nombre','descripcion'),
);
$searchTables = array();
$searchTables['soluciones_'] = array(
'viewerUrl' => 'Soluciones_ver.php',
'titleField' => 'id',
'summaryField' => 'descripcion',
'searchFields' => array('id','descripcion'),
);
$searchTables = array();
$searchTables['certificaciones_'] = array(
'viewerUrl' => 'Certificaciones_ver.php',
'titleField' => 'nombre',
'summaryField' => 'descripcion',
'searchFields' => array('nombre','descripcion'),
);
list($searchRows, $searchDetails) = searchMultipleTables($searchTables, $searchOptions);
?>
And only put this?<?php
require_once "/home/content/w/w/t/wwtrainingsk2/html/cmsAdmin/lib/viewer_functions.php";
$searchOptions = array();
$searchOptions['keywords'] = @$FORM['q'];
$searchOptions['perPage'] = "20";
$searchOptions['debugSql'] = "0"; [font "Verdana"]$searchTables = array(); list($searchRows, $searchDetails) = searchMultipleTables($searchTables, $searchOptions);
?>
By Dave - May 23, 2008
I've removed all the others and updated it for you on your server. Make a backup of this file and have a look:
http://www.worldwidetrainings.com/Search.php?q=training
Hope that helps. Let me know if you have any more questions about that or need any more help!
interactivetools.com
By jposwald - May 26, 2008
Thank you!
By Dave - May 26, 2008
If you could specify an extra field (extraField1) to load from each table would that be enough for you to do your if conditions and create dynamic links?
interactivetools.com
Re: [Dave] MultiSearch
By richo - May 27, 2008
Thanks
John
Re: [richo] MultiSearch
By Dave - May 27, 2008
It looks like that might be because you have two list viewers on the same page. One for search results and one for MP3s. So when you click "next" the the MP3's it puts &page=2 in the url and both viewers try to show page 2, even if it doesn't exist.
One solution might be to put one of the list viewers (the MP3s) in an iframe. Would that work for you? Or you could split up the page some other way.
Hope that helps!
interactivetools.com
Re: [Dave] MultiSearch
By richo - May 27, 2008
Is there a way that the results can be displayed in the "whateverDetail.php" page as a list rather than individual links in the results page?
Thanks again for your help.
John
Re: [richo] MultiSearch
By Dave - May 27, 2008
You might need to add some extra code to the detail page if it's going to be paging through results though because by default it just loads the record number on the end of the url.
See how far you can get with it and let me know when you need help.
Hope that helps.
interactivetools.com