php - Importing XML-RPC data to SQL table -


I want to be honest, so, from the beginning, I will tell you that I am not very good with this stuff. I am new to PHAP / SQL etc., and I am related to this problem at the moment, so any help would be appreciated.


My problem is next:

On a website, I have access to using the API but, The problem is that its XML-RPC has read all the guides and tried to googling for some sort of solution, but I had no luck with it.

I want to import xml-rpc data directly into the existing SQL table.


This is the method I want to use to call data:

  Name: "money Returns: Array (array, amount, timestamp))    .Received: Array ("API key", "Player name", "Minimal timestamp (0 is fine for complete history) Hr> 

And this is the code I have:

   the money was received   & lt; br>; # Var_dump ($ response2); Echo "& lt; BR & gt;"; Echo "& lt; table range = '1' & gt;"; Echo displayTree ($ response2); Echo "& lt; / table & gt;"; } Function displayTree ($ var) {$ newline = "\ n"; Forex currency ($ key as $ var => $ value) {if (is_array ($ value) is_object ($ value)) {$ value = $ newline is "& lt; tr & gt;" . DisplayTree ($ value) "& lt; / tr & gt;"; } If (is_array ($ var)) {if (! Stripos ($ value, "
  • ")) {$ output. = "& Lt; td & gt;" . $ Value "& lt; / td & gt;" . New line $; } And {$ Output. = $ Value New Line $; }}} Returns $ output; }? & Gt; You can find here the result of that code:

    Some types of data in that XML, but, I want to import that data into SQL, and the problem is that I do not know how.

    I want to call each of those lines in the SQL table separately, the client ", so I will later

    , then, any help would be appreciated, Even if it is actually linked to a useful page, where I can find my solution.)

    Thank you in advance, Lauren

    I did not really see the format of your XML, so this is the sample code, which will include your I do not have the code, if I have an opportunity, then I will come back and keep an eye on my data closely.

    I used to use something like this in the stored method in Ms_sql. I pass XML as a parameter. The XML is then inserted into a temporary table, after which I can use standard sql.

      build process [dbo] [ProcXMLImport] @ PVXXXxM Lwarar (max) = NULL, @ Piaaiararaiar Intret = 0 outputs to declare the return error code emitter C ++ code @ Vipiiaraarvrkr (200) = 'output as par @ RC Int; Create the table #import (id int, val varchar (200)) if declare (@pvchCustomXML is not empty) @ xml_id int exec @rc = sp_xml_preparedocument @xml_id OUTPUT, @pvchCustomXML; If (@@ Error! = 0 or @ RC! = 0) exec sp_xml_removed document @ xml_id; Set @pvchError = 'sp_xml_preparedocument failed' set @piError = 1 return @ PAIRR; Enter value in the end-temps table - Not strictly required but include potential errors #import Selective ID, Open XML with WAL (@ XML_ID, 'Custom / Lines / Line', 1) - 'Custom / Lines / Line' Specifies where to extract data from the XML structure (id int, valve negotiation (200)) (@@ error! = 0) exec sp_xml_removed document @xml_id; Set @pvchError = 'Import Failed' Set @ PIERR = 2 returns @ PAIRR; End; - Clean xml, no longer required exec sp_xml_removed document @xml_id; Finally, from #import end * to   

    MySQL has a function extract value (), which has the same objective with 'OpenXML'.

    P>

  • Comments

    Popular posts from this blog

    mysql - BLOB/TEXT column 'value' used in key specification without a key length -

    c# - Using Vici cool Storage with monodroid -

    python - referencing a variable in another function? -