Buenos días amigos, soy nuevo en el foro y me he registrado porque tengo una duda urgente de resolver.
Tengo un sistema que me genera unos archivos JSON a partir de unos correos y necesito dividir o parcear los datos que me interesan y almacenarlos en una BDD, en la tabla que le corresponde.
Ejemplo:
Tengo este trozo en JSON
{"orders_id":"476","customers_name":"Lizmar ","customers_company":"","customers_street_address ":"Boyaca III","customers_suburb":"","customers_city":"Barce lona","customers_postcode":"","customers_state":"" ,"customers_telephone":"04145429545","customers_ex trafield":"22844401","customers_email_address":"l_ [email protected]","delivery_name":"Lizmar ","delivery_company":"","delivery_street_address": "Boyaca III","delivery_suburb":"","delivery_city":"Barcelo na","delivery_postcode":"","delivery_state":"","de livery_country":"229","billing_name":"Lizmar ","billing_company":"","billing_street_address":"B oyaca III","billing_suburb":"","billing_city":"Barcelona ","billing_postcode":"","billing_state":"","billin g_country":"229","orders_status_id":"16","orders_d ate_finished":"2013-11-08 12:13:57","order_last_modified":"2013-11-15 11:10:41","currency_type":"VEF","shipping_mode":"P uerto La Cruz, El Tiempo","order_amount":"24.00","shipping_amount":" 0.00","total_amount":"26.88","payment_date":"2013-11-08 12:13:57","remark":"Pending","city_tax_amount":2.8 8,"message":"","coupon_code":null,"coupon_amount": "0.00","product-1":{"products_name":"Hermosas","products_title":"F otos","products_quantity":"1","productsize":"Foto 10x15 cm","products_price":"6.00"},"product-2":{"products_name":"Mi bella madre","products_title":"Fotos","products_quantity ":"1","productsize":"Foto 10x15 cm","products_price":"6.00"},"product-3":{"products_name":"Mi peque\u00f1a","products_title":"Fotos","products_q uantity":"1","productsize":"Foto 10x15 cm","products_price":"6.00"},"product-4":{"products_name":"Mi peque\u00f1a02","products_title":"Fotos","products _quantity":"1","productsize":"Foto 10x15 cm","products_price":"6.00"}}
Y necesito de alli, capturar el "customers_name" (Que es el nombre de mi clienta) llamada "Lizmar ", y guardarlo en mi BDD, en mi tabla 'Clientes', en el campo 'Nombre del cliente'
He intentado con PHP y no he podido, la cuestion va mas o menos con Java pero no logro resolverlo. No es tan complicado como parece.
Esto puedan ayudarme, de verdad es muy conseguir una solución
Gracias a todos de antemano