|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Could you help me with this mysql-search problem.
I have tried everything and i still haven't find an answer for it. I want to make a little search ( I found this email from an article at devshed.com ) witch counts query from column. For example if have a table like: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> +----+-----------------------+ | id | string | +----+-----------------------+ | 1 | file test test array | | 2 | test test test test | | 3 | find search test | | 4 | empty set | +----+-----------------------+ [/quote] Let say I have a form with one field, named "query". How can i make mysql-query count that "query" from column "string"? I don't know if you got already my point but if i put it this way. I use that same table here and i'd like to search it with querystring "test". I should give me result like this: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> +----+--------+ | id | count | +----+--------+ | 1 | 2 | | 2 | 3 | | 3 | 1 | | 4 | 0 | +----+--------+ [/quote] So it just counts that word "test" from that column "string". I think this is quite easy but I haven't found any answer for this problem. I would appriciate any help for this! Thanks!! |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Counting a word |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|