 |
|
 |
|
Next: function problem involving query
|
| Author |
Message |
External

Since: Mar 27, 2008 Posts: 2
|
(Msg. 1) Posted: Thu Mar 27, 2008 3:52 pm
Post subject: explode string sql Archived from groups: alt>php>sql (more info?)
|
|
|
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:string3'); )
please help me. >> Stay informed about: explode string sql |
|
| Back to top |
|
 |  |
External

Since: Dec 01, 2003 Posts: 164
|
(Msg. 2) Posted: Fri Mar 28, 2008 12:02 am
Post subject: Re: explode string sql [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
janek 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:string3'); )
It's better you fix your database, create a table where you can have "one to
many" connections.
--
//Aho >> Stay informed about: explode string sql |
|
| Back to top |
|
 |  |
External

Since: Mar 27, 2008 Posts: 2
|
(Msg. 3) Posted: Fri Mar 28, 2008 12:09 pm
Post subject: Re: explode string sql [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
J.O. Aho pisze:
> janek 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:string3'); )
>
> 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.. >> Stay informed about: explode string sql |
|
| Back to top |
|
 |  |
External

Since: Oct 28, 2007 Posts: 128
|
(Msg. 4) Posted: Fri Mar 28, 2008 4:36 pm
Post subject: Re: explode string sql [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
janek wrote:
> J.O. Aho pisze:
>>
>> 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..,
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. >> Stay informed about: explode string sql |
|
| Back to top |
|
 |  |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|