Anzeige - [Hier werben / Mediadaten]
(?) Tags raten (?) (edit)
 
Reply to this topicStart new topicStart Poll
> Suchscript für Mehrere MySQL Tabellen, Probleme mit DGSSearch
Sandro Feuillet
zehnplus GmbH
Geschrieben am: Mo 13.02.2006, 20:29
Report PostQuote Post

AyomRank 7
Group Icon

Gruppe: Moderatoren
Beiträge: 1469
Mitglied seit: 4.05.2004


Ich habe mit DGSSearch ein Script gefunden, welches genau bietet was ich suche. Leider komme ich mit der Konfiguration nicht klar, vielleicht kann mir hier jemand helfen:

Ich habe ein Blog und ein Forum ( :-) ) leider kann ich nicht alles aufs mal durchsuchen, genau das sollte das Script machen:

Die Vier Tabellen nach Stichwörtern durchsuchen, vernünftig ranken (inkl. fuzzysearch) und eine Resultatseite ausspucken. Doch leider bleibe ich in der Konfiguration hängen, ich verstehe folgende Passage in der Anleitung zur Konfiguration nicht:

QUOTE

$database[x]["tableAssoc"] - Datatype: (String) - Ex: "article.magazineid = magazine.magazineid"

      A string of rules for associating the records in multiple tables. If you
      are only searching one table, set this value to the empty string.

      If you had the SQL statement:

        SELECT * FROM article, magazine WHERE article.magazineid = magazine.magazineid;

      The "tableAssoc" is used to build the "article.magazineid = magazine.magazineid" section
      of that statement.


    $database[x]["returnField"] - Datatype: (Array of String) - Ex: array("author", "title", "mag_name", "articleid")

      The fields returned from the database. These fields can be used to substitute
      into the URL and description. The fields are referred to in the same order
      they are listed within the array, starting from 0. The first field 'author'
      would be referred to as '@0@'. The second field 'title' would be referred to as
      @1@. The third field 'mag_name' would be '@2@', etc.

      If you had the SQL statement:

        SELECT author, title, mag_name, articleid FROM table WHERE articleid = 1;

      The "returnField" array is used to build the "author, title, mag_name, articleid"
      section of that statement. It determines what data from the database you can use to
      build your "link", "url" and "desc" on the results page.


    $database[x]["searchField"] - Datatype: (Array of String) - Ex: array("title")

      The field(s) to search within your table. These are the fields DGS Search will search to
      locate results.

      If you had the SQL statement:

        SELECT articleid, title FROM table WHERE title = "Rings";

      The "searchField" array is used to build the "title = Rings" section of that statement.


Bei mir sieht das so aus.

CODE

$database[0]['table']        = array(' minibbtable_posts',' minibbtable_topics',' wp_posts',' wp_comments');                         /* The table in database to search. */

$database[0]['tableAssoc']   = '';       /* If multiple tables listed, is used to join the tables. See INSTALL. */

$database[0]['searchField']  = array('title', 'artist');             /* The fields to search. */


Ich verstehe nicht, wie ich die Tabellen joinen muss?? gmpf


--------------------
Gruss Sandro

--------------------------------------------------------------------------

zehnplus - Wir optimieren Ihre Seite SEO, Online-Kundendienst, Usability
Politik Forum Schweiz Das führende Schweizer Politikforum
Top
PMEmail PosterUsers WebsiteYahooMSN
Top
 
 

#2 Geschrieben am: Di 21.02.2006, 16:25 (+7d 19:55)
Report PostQuote Post

AyomRank 1
**

Gruppe: Member (inaktiv)
Beiträge: 0
Mitglied seit: --


Hallo

So wie ich das lese sind die Tables im array
$database[0]['table'] = array(' minibbtable_posts',' minibbtable_topics',' wp_posts',' wp_comments');
alle in einer Abfrage:
SELECT * FROM article, magazine WHERE article.magazineid = magazine.magazineid;
Hier wäre es das array(article,magazine)

Das entsprechende array
$database[0]['tableAssoc'] = array('article.magazineid','magazine.magazineid');

oder da die Tabellenname ja bereits im anderen array gespeichert sind:
$database[0]['tableAssoc'] = array('magazineid','magazineid');

Gruss

Tümmel

Top
PMEmail Poster
Top
 
Thema wird von 0 Benutzer(n) gelesen (0 Gäste und 0 anonyme Benutzer)
0 Mitglieder:
Trackback-Url: http://www.ayom.com/track/t/10585

Topic Options Reply to this topicStart new topicStart Poll

 


> Ähnliche Themen
PHP/MySQL Modul/Addon schreiben (evtl. für WP?) vendy 64 0 Mi 31.12.2008, 17:50
Engetragene Datensätze ermitteln PHP & MySQL TTlong 143 4 Sa 20.12.2008, 21:53
Rekursives Auslesen php &mysql Daniel Steffen - ehemals Cieslar 381 21 Fr 19.12.2008, 21:50
Problem MySQL-Abfrage Magical 195 2 Mo 15.12.2008, 07:48
Wie mehrere Fenster hintereinander öffnen memoriam 127 1 Mo 8.12.2008, 11:34
Mehrere Bildschirme an einem PC Seth.Gecko 2253 14 Mo 24.11.2008, 15:12
Lost connection to MySQL cr4m0 175 4 So 23.11.2008, 14:31
MySQL Frage G.P. 143 2 Mo 17.11.2008, 15:59
Mehrere TexterInnen gesucht Ansgar Sadeghi 223 3 Do 13.11.2008, 19:59
Suche Freelancer: Ajax, XML, PHP, MySQL omc 378 3 Mi 12.11.2008, 18:22




Anzeige - [Hier werben / Mediadaten]



Anzeigen


[Hier werben / Mediadaten]