|
|
|
PHP อยากจะ Convert แปลงข้อมูล JSON พวกนี้ ลง MySQL ครับช่วยหน่อยครับ |
|
|
|
|
|
|
|
Code
[{"SerieName":"Dream House","PartNumber":"1","PartName":"Thai","Link":"dream.house.2011.dub.mp4","Sort":0,"LastUpdated":"0001-01-01T00:00:00","LastUpdated2":null},{"SerieName":"Dream House","PartNumber":"2","PartName":"Soundtrack","Link":"dream.house.2011.sub.mp4","Sort":0,"LastUpdated":"0001-01-01T00:00:00","LastUpdated2":null}]
จะแปลง ลง MyQSL ยังไงครับ
Tag : PHP, MySQL, JavaScript, Windows, Web Service
|
|
|
|
|
|
Date :
2013-09-30 16:59:12 |
By :
Tinnakorn |
View :
723 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
$array_of_data = json_decode('[{"SerieName":"Dream House","PartNumber":"1","PartName":"Thai","Link":"dream.house.2011.dub.mp4","Sort":0,"LastUpdated":"0001-01-01T00:00:00","LastUpdated2":null},{"SerieName":"Dream House","PartNumber":"2","PartName":"Soundtrack","Link":"dream.house.2011.sub.mp4","Sort":0,"LastUpdated":"0001-01-01T00:00:00","LastUpdated2":null}]
',TRUE);
/*
array (size=2)
0 =>
array (size=7)
'SerieName' => string 'Dream House' (length=11)
'PartNumber' => string '1' (length=1)
'PartName' => string 'Thai' (length=4)
'Link' => string 'dream.house.2011.dub.mp4' (length=24)
'Sort' => int 0
'LastUpdated' => string '0001-01-01T00:00:00' (length=19)
'LastUpdated2' => null
1 =>
array (size=7)
'SerieName' => string 'Dream House' (length=11)
'PartNumber' => string '2' (length=1)
'PartName' => string 'Soundtrack' (length=10)
'Link' => string 'dream.house.2011.sub.mp4' (length=24)
'Sort' => int 0
'LastUpdated' => string '0001-01-01T00:00:00' (length=19)
'LastUpdated2' => null
*/
แปลงเองนะครับ :)
|
ประวัติการแก้ไข 2013-09-30 17:01:27
|
|
|
|
Date :
2013-09-30 17:00:55 |
By :
itpcc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ครับเดี๋ยวผมลองทำดูตรับ
|
|
|
|
|
Date :
2013-09-30 17:03:45 |
By :
Tinnakorn |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|