Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

explode string sql
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.

Report this thread to moderator Post Follow-up to this message
Old Post
janek
03-28-08 12:17 AM


Re: explode string sql
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:stri
ng3'); )

It's better you fix your database, create a table where you can have "one to
many" connections.

--

//Aho

Report this thread to moderator Post Follow-up to this message
Old Post
J.O. Aho
03-28-08 12:17 AM


Re: explode string sql
J.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..

Report this thread to moderator Post Follow-up to this message
Old Post
janek
03-28-08 01:04 PM


Re: explode string sql
janek 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.



Report this thread to moderator Post Follow-up to this message
Old Post
Paul Lautman
03-29-08 12:12 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:03 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.