Hi
I am trying to implement an internal search function. Drupal's search only displays site content it knows about.
However I am trying to index dynamic DB data from my own custom table.
Whats the best way to do this?
Should I use a drop down menu and search on fields like name,address,area etc? Or can drupal do this for me using its own search and some extra tweaking?
thanks,
Paul
<?php
$sql="SELECT * FROM {catalog}"; $result = pager_query($sql, $limit = 10, $element = 0, $count_query = NULL);
while ($row = db_fetch_object($result)) {
$fields = array(); // define empty array array_push($fields,$row); // push row object onto the array print("Print Object <br>"); print_r($row);
print("<p><hr><p> "); }
?>
You might want to check out hook_search ( http://api.drupal.org/api/function/hook_search/6)
On Thu, Feb 11, 2010 at 1:42 AM, spartaguy spartaguy <spartaguy300@gmail.com
wrote:
Hi
I am trying to implement an internal search function. Drupal's search only displays site content it knows about.
However I am trying to index dynamic DB data from my own custom table.
Whats the best way to do this?
Should I use a drop down menu and search on fields like name,address,area etc? Or can drupal do this for me using its own search and some extra tweaking?
thanks,
Paul
<?php $sql="SELECT * FROM {catalog}"; $result = pager_query($sql, $limit = 10, $element = 0, $count_query = NULL); while ($row = db_fetch_object($result)) { $fields = array(); // define empty array array_push($fields,$row); // push row object onto the array print("Print Object <br>"); print_r($row); print("<p><hr><p> "); } ?>
-- [ Drupal support list | http://lists.drupal.org/ ]