Jump to content

kodlcan

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kodlcan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. AGAINST('+"$query1 +$query2...... BAD ONE. this is correct: AGAINST('+$query1 +$query2... I made this one when I rewrote this here. This is not the problem. :D
  2. I have followin': CREATE TABLE `PKZ_ciselnik` (   `ciselnik_PKZ` int(10) unsigned NOT NULL default '0',-- id   `ciselnik_nazevzbozi` varchar(255) NOT NULL default '',-- product name   `ciselnik_nazevpodskupiny` varchar(255) NOT NULL default '',-- subclass name   `ciselnik_nazevvyrobce` varchar(255) NOT NULL default ''-- manufacturer ) ENGINE=MyISAM DEFAULT CHARSET=cp1250; CREATE TABLE `lekarny` (-- reseller   `lekarna_id` tinyint(3) unsigned NOT NULL default '0',--id   `lekarna_jmeno` varchar(255) NOT NULL default ''--name ) ENGINE=MyISAM DEFAULT CHARSET=cp1250; CREATE TABLE `zbozi_vse` (   `zbozi_PKD` int(10) unsigned NOT NULL default '0',--id   `zbozi_mnozstvi` int(11) NOT NULL default '0',--amount   `zbozi_cenasdph` float unsigned NOT NULL default '0',--price   `zbozi_lekarna` tinyint(3) unsigned NOT NULL default '0',--drugstore number   `zbozi_SID` int(10) unsigned NOT NULL default '0'--drugstore internal number ) ENGINE=MyISAM DEFAULT CHARSET=cp1250; The problem is that I need custom this working schema to work with Score parameter to sort it by relevancy: I have this: and it works... SELECT ciselnik_PKZ, ciselnik_nazevzbozi, ciselnik_nazevvyrobce, lekarna_jmeno, zbozi_mnozstvi, zbozi_cenasdph FROM PKZ_ciselnik, zbozi_vse, lekarny WHERE (PKZ_ciselnik.ciselnik_PKZ = zbozi_vse.zbozi_PKD AND zbozi_vse.zbozi_lekarna = lekarny.lekarna_id) AND MATCH(ciselnik_nazevzbozi, ciselnik_nazevvyrobce) AGAINST('+"$query1 +$query2' IN BOOLEAN MODE); but how to custom it like this: ?? SELECT *, MATCH(title, body) AGAINST('$keyword') AS score FROM articles WHERE MATCH(title, body) AGAINST('$keyword') ORDER BY score DESC The problem is how to acomplish to implement the part where two tables are joined with WHERE with MATCH...AGAINST part. When I simply rewrite sample with my data like this "WHERE (PKZ_ciselnik.ciselnik_PKZ = zbozi_vse.zbozi_PKD AND zbozi_vse.zbozi_lekarna = lekarny.lekarna_id) AND MATCH (ciselnik_nazevzbozi, ciselnik_nazevvyrobce) AGAINST ('paralen')AS Score ORDER BY Score; mySQL reports error in the "...AS Score part". Could anyone help me with?? ThnX a lot. Kodl
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.