Trying to copy items to an archive DB.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adriann
    New Member
    • Aug 2006
    • 25

    Trying to copy items to an archive DB.

    In the basic & crude code example below,...

    $result = mysql_query("se lect * from news, where status = "archived") ;
    while($r=mysql_ fetch_array($re sult)) {
    // process $result as required
    }
    }

    ...it is my understanding that the variable "$result" holds 1 entire row of the content of a database. Firstly, is that statement correct.???

    If so, I was wanting to transfer the entire row to an identically structured DB, for the purpose of arhival storage.

    What would be an example of code that could transfer whole rows of info to an identically structured DB.

    thx
    Adrian
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    As always with these sort of questions: before you ask: FIRST HAVE A LOOK AT THE STANDARD PHP documentation



    which clearly states:

    [PHP]For SELECT, SHOW, DESCRIBE or EXPLAIN statements, mysql_query() returns a resource on success, or FALSE on error.
    [/PHP]

    Ronald :cool:

    Comment

    Working...