CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 2468|Reply: 6

Macam mana nak improve sql query ini?

[Copy link]
Post time 8-9-2007 03:21 PM | Show all posts |Read mode
select * from artikel where body
like concat('%', katakunci, '%');


Ada ruang untuk improve tak?
Reply

Use magic Report


ADVERTISEMENT


Post time 8-9-2007 10:14 PM | Show all posts
select * from artikel where body like %katakunci% takyah concat takpe.. ermm apa maksud improve tuh..
Reply

Use magic Report

Post time 10-9-2007 10:30 PM | Show all posts
ooo ni nak buat text-based search ni ye...hmm kena tengok buku balik nih...
Reply

Use magic Report

Post time 11-9-2007 10:48 AM | Show all posts
Originally posted by alusmetai at 8-9-2007 03:21 PM
select * from artikel where body
like concat('%', katakunci, '%');


Ada ruang untuk improve tak?

APsal nak kena concat field katakunci tu? dengan % lak tu...

apa kata wat full-text je.. senang
Reply

Use magic Report

Post time 11-9-2007 10:50 AM | Show all posts
sat sat....... errr... katakunci tu tu variable ke field lain? ataupun field dalm table lain?
Reply

Use magic Report

Post time 12-9-2007 01:16 AM | Show all posts
pertama sekali.. jangan pakai * untuk buat selection...
Reply

Use magic Report

Follow Us
Post time 15-9-2007 02:59 PM | Show all posts
Originally posted by alusmetai at 8-9-2007 03:21 PM
select * from artikel where body
like concat('%', katakunci, '%');


Ada ruang untuk improve tak?


Aku assume kau pakai mysql.

Cuba baca sini
http://www.onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

5-1-2025 08:58 AM GMT+8 , Processed in 0.097791 second(s), 17 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list