EDIT:
OK, I have found the solution myself, it is perfect plugin, with a little thinking is capable of what is otherwise difficult to do:
in my case, to get the number of records I used:
SELECT: LENGTH(cb_recordedspeciestotal) - LENGTH(REPLACE(cb_recordedspeciestotal, 'b', ''))
FROM: #__comprofiler
WHERE: user_id = {USERID}
the function in "SELECT" counts the occurence of "b" in the table column.
Hello, this seems to be exactly what Im loking for! Could you please help me defining the plugin for my needs?
In my jos_comprofiler database table there is a field "cb_recordedspecies" that contains all the recorded bird species of the user, the species are substituted by a simple code:
b1|*|b2|*|b3|*|b4|*|b5|*|b6|*|b7|*|b8|*|b9|*|b10
each b is different bird
Now I need to automatically add the field that simply counts the total number of recorded species (i.e. "b" in the table field), it the case of example there would be 10 species recorded by the user - how do I define your plugin?
I tried e.g. this but it did not work (I know nothing about database commands):
SELECT b,count(b)
FROM #__comprofiler.cb_recordedspecies
WHERE user_id={USERID}
Thank you very very much for your help!!!
Post edited by: medaacek, at: 2010/04/22 15:15
Post edited by: medaacek, at: 2010/04/22 19:25