Mysql returns array string but want in numbers -


i have table 2 rows

uid  & ids  1   & 2.3 2   & 5 3   &   4 4   &  1.2 

etc
write query gruop_concat()

query is

select * tbltable tableid not in(     select tableid     `tblbooking`     restaurantid = 1         , date(starttime) = date(p_starttime)         , time(starttime) >= time(p_starttime)         , time(endtime) <= time(p_endtime)     )     , noofseats >= p_noofseats 

it returns "2,3,4,5,1,2" want comma separated values not string 2,3,4,5,1,2

this exact thing substring

select substring_index(substring_index(maintable.choices,',',othertable.id),',',-1) choice maintable inner join othertable on (length(choices)>0 , substring_index(substring_index(choices,',',othertable.id),',',-1) <> substring_index(substring_index(choices,',',othertable.id-1),',', -1));

please check link http://www.tero.co.uk/scripts/mysql.php

thanks .


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -