Code Comments
Programming Forum and web based access to our favorite programming groups.Hello all,
I have code sql:
SELECT sur_dokid FROM table1
WHERE sur_dokid IN ('1026, 1027, 1028')
I would like explode/divide string to array .
Example :
sur_dokid IN ('1026, 1027, 1028') convert sur_dokid IN (1026, 1027, 1028)
(In PHP code is: $array=explode(':','string1:string2:stri
ng3'); )
please help me.
Post Follow-up to this messagejanek wrote:
> Hello all,
>
> I have code sql:
>
> SELECT sur_dokid FROM table1
> WHERE sur_dokid IN ('1026, 1027, 1028')
>
>
> I would like explode/divide string to array .
> Example :
> sur_dokid IN ('1026, 1027, 1028') convert sur_dokid IN (1026, 1027, 1028)
> (In PHP code is: $array=explode(':','string1:string2:stri
ng3'); )
It's better you fix your database, create a table where you can have "one to
many" connections.
--
//Aho
Post Follow-up to this messageJ.O. Aho pisze: > janek wrote: > > It's better you fix your database, create a table where you can have > "one to many" connections. > Thank's, but I have specyfic structure data base.., I thought that exists this function 'explode' sql..
Post Follow-up to this messagejanek wrote: > J.O. Aho pisze: > Thank's, but I have specyfic structure data base.., Yes, and what Aho is poingint out is that you have a bad structure in your database. Fix that and you don't have the problem.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.