In Datenbank Zählen

sterndi

Erfahrenes Mitglied
Hallo leute!

ich brauche eure hilfe.
Wie kann ich es ermöglichen das er in der datenbank zählt wie oft ein wort in der datenbank vorkommt,

Ich hoffe ihr könnt mir helfen.

Mfg sterndi
 
PHP:
$res = mysql_query("select count(*) from table where text like 'text'");
list($anz) = mysql_fetch_row($res);

Gruß, Citral
 
Ist nicht sehr kompliziert:
Code:
SELECT
        LENGTH(`spalte`) - LENGTH(REPLACE(`spalte`, 'suchwort', '')) AS `anzahl`
  FROM
        `tabelle`
 
Zurück