Jump to content


Flat file database

  • Please log in to reply
No replies to this topic

#1 iesus

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 March 2006 - 10:29 PM

Hello evryone,
I have changed an existing Searchscript to a database script,
now i have come up with a prob.

i can make it pull strings from database, what i cannot is
to make it pulling strings w/o an function for each string to pull,
etc for pulling colors i have an function for color1 color2 color3

instead of a function for Color[i++]

the functions look like this:

function Color($Artikel) {
// $Artikel = trim((($Artikel)));
$search_data = @file($GLOBALS[index_file]) or die("<h4 align=\"center\">$GLOBALS[err_no_search_db]</h4>");
foreach ($search_data as $search_page) {
$page_arr = explode("|", $search_page);
$found_count = 0;
$qry_array = split('[, ]',trim(($Artikel)));
foreach ($qry_array as $qry) {
if (in_array($qry, $page_arr)) {
$pages_found .= $page_arr[4] . " ";
if ($found_count == count($qry_array)) $Color[] = $page_arr[4];
return $Color;

Needed for all functions are:

$Colour = Color($q);
foreach ($Colour as $Color);

I am stuck What to do,
full script available here:
[a href=\"http://www.interad.se:8090/DataBase/DataBase.rar\" target=\"_blank\"]http://www.interad.se:8090/DataBase/DataBase.rar[/a]
[a href=\"http://www.interad.se:8090/DataBase/DataBase.tar.gz\" target=\"_blank\"]http://www.interad.se:8090/DataBase/DataBase.tar.gz[/a]
seen in action here:
[a href=\"http://www.odiumclothing.net\" target=\"_blank\"]http://www.odiumclothing.net[/a]

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users