MySQL Forums
Forum List  »  Connector/Node.js

extractdata/php/mysql/xml
Posted by: David Forster
Date: July 26, 2007 10:41PM

$query="SELECT EXTRACTVALUE('$xmlstring','//uniqueID') as uniqueID,EXTRACTVALUE('$xmlstring','//agentID') as agentID, EXTRACTVALUE('$xmlstring','//objects/img[1]/@url') as image, EXTRACTVALUE('$xmlstring','//objects/img[2]/@url') as image2, EXTRACTVALUE('$xmlstring','//objects/img[3]/@url') as image3, EXTRACTVALUE('$xmlstring','//objects/img[4]/@url') as image4";

it is returning the array like -
Array
(
[uniqueID] => 202326 204030 204042 204121 204565 206405 206424 212754 216443 216455 218602 218991 220373 221197 221609 221665 222017 222460 223334 223428 224566 226241 228913 229091 229987 229989 230031 234460 234658 234794 234808 234816 234880 234991 237915 238941 240706 240919 242864 253739 256573 258114 261026
[agentID] => 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123
[image] => http://www.dummy.com.au/main_1172449878.jpg http://www.dummy.com.au/main_1172450723.jpg http://www.dummy.com.au/main_1173330755.jpg http://www.dummy.com.au/main_1173332912.jpg http://www.dummy.com.au/main_1173743586.jpg http://www.dummy.com.au/main_1174887922.jpg http://www.dummy.com.au/main_1177738131.jpg http://www.dummy.com.au/main_1179580538.jpg http://www.dummy.com.au/main_1175660173.jpg http://www.dummy.com.au/main_1180488072.jpg http://www.dummy.com.au/main_1175746683.jpg http://www.dummy.com.au/main_1176791365.jpg http://www.dummy.com.au/main_1179554658.jpg http://www.dummy.com.au/main_1180012488.jpg http://www.dummy.com.au/main_1177560794.jpg http://www.dummy.com.au/main_1177751778.jpg http://www.dummy.com.au/main_1177752039.jpg http://www.dummy.com.au/main_1177832922.jpg http://www.dummy.com.au/main_1179126968.jpg http://www.dummy.com.au/main_1179215542.jpg http://www.dummy.com.au/main_1179706002.jpg http://www.dummy.com.au/main_1179705795.jpg http://www.dummy.com.au/main_1179208856.jpg http://www.dummy.com.au/main_1179227869.jpg http://www.dummy.com.au/main_1181171003.jpg http://www.dummy.com.au/main_1179736213.jpg http://www.dummy.com.au/main_1179806502.jpg http://www.dummy.com.au/main_1180047222.jpg http://www.dummy.com.au/main_1180076338.jpg http://www.dummy.com.au/main_1180581703.jpg http://www.dummy.com.au/main_1183079339.jpg http://www.dummy.com.au/main_1184030860.jpg http://www.dummy.com.au/main_1184291774.jpg http://www.dummy.com.au/main_1184978924.jpg
[image2] => http://www.dummy.com.au/1_1172449881.jpg http://www.dummy.com.au/1_1172450727.jpg http://www.dummy.com.au/1_1173743587.jpg http://www.dummy.com.au/1_1174886555.jpg http://www.dummy.com.au/1_1177738133.jpg http://www.dummy.com.au/1_1179580229.jpg http://www.dummy.com.au/1_1179305925.jpg http://www.dummy.com.au/1_1177791216.jpg http://www.dummy.com.au/1_1178403442.jpg http://www.dummy.com.au/1_1180012489.jpg http://www.dummy.com.au/2_1177751778.jpg http://www.dummy.com.au/1_1177752041.jpg http://www.dummy.com.au/1_1179126969.jpg http://www.dummy.com.au/1_1179215543.jpg http://www.dummy.com.au/1_1179706009.jpg http://www.dummy.com.au/1_1179268178.jpg http://www.dummy.com.au/1_1179736214.jpg http://www.dummy.com.au/1_1180076338.jpg http://www.dummy.com.au/1_1183079340.jpg http://www.dummy.com.au/1_1184292402.jpg
[image3] => http://www.dummy.com.au/2_1172449884.jpg http://www.dummy.com.au/2_1172450732.jpg http://www.dummy.com.au/2_1173743588.jpg http://www.dummy.com.au/2_1174886558.jpg http://www.dummy.com.au/2_1177738134.jpg http://www.dummy.com.au/2_1179580230.jpg http://www.dummy.com.au/2_1179306273.jpg http://www.dummy.com.au/2_1177792439.jpg http://www.dummy.com.au/2_1179264891.jpg http://www.dummy.com.au/2_1179833200.jpg http://www.dummy.com.au/3_1177751778.jpg http://www.dummy.com.au/2_1177755612.jpg http://www.dummy.com.au/2_1179126970.jpg http://www.dummy.com.au/2_1179268180.jpg http://www.dummy.com.au/2_1179723943.jpg http://www.dummy.com.au/2_1180076338.jpg http://www.dummy.com.au/2_1184292408.jpg
[image4] => http://www.dummy.com.au/3_1174886561.jpg http://www.dummy.com.au/3_1177739108.jpg http://www.dummy.com.au/3_1179580539.jpg http://www.dummy.com.au/3_1180488540.jpg http://www.dummy.com.au/3_1177792440.jpg http://www.dummy.com.au/3_1178403085.jpg http://www.dummy.com.au/3_1179833339.jpg http://www.dummy.com.au/x4_1177751778.jpg http://www.dummy.com.au/3_1177755613.jpg http://www.dummy.com.au/3_1179126972.jpg http://www.dummy.com.au/3_1179268181.jpg http://www.dummy.com.au/3_1179723945.jpg http://www.dummy.com.au/3_1180076338.jpg
)

Is there anyway quick way to get it so each element has its own row ? rather then having it all bunched up into 1 row ?

Options: ReplyQuote


Subject
Written By
Posted
extractdata/php/mysql/xml
July 26, 2007 10:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.