Dear All,
I would like to how to concatenate the values from an array to form a complete sql query, say for example
The array looks like this :
Arraytest[1] = "SELECT"
Arraytest[2] = "*"
Arraytest[3] = "FROM"
Arraytest[4] = "TABLE1"
Arraytest[5] = "WHERE"
Arraytest[6] = "NAME"
Arraytest[7] = "="
Arraytest[8] = "BUSH"
And from this i need to form a SQL qury like this ""SELECT * FROM TABLE1 WHERE NAME = 'BUSH'" and need to pass this into a Variable "$test", number of subscript of this array depends upon the length of query, can any one guide me how to do this? Since i'm a mainframe professional and new to this technology!!
Thank you,
Antony
How to concatenate values from an array to form an SQL q?
Moderator: General Moderators
-
pravonline
- Forum Newbie
- Posts: 2
- Joined: Wed May 24, 2006 2:18 am
Code: Select all
$test = implode(' ', $Arraytest);-
pravonline
- Forum Newbie
- Posts: 2
- Joined: Wed May 24, 2006 2:18 am
Thanks Mr.Neo Geek
Thank you so much Mr. Neo Geek, That is what exactly i want, Thanks once again for your valuable reply,
Regards,
Antony
Regards,
Antony