Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Nebenbei Needham help / Select and Update PHP Script

    Hi,

    I'm a newbie.
    I try to combine following Codes:

    PHP Code:
    $query "UPDATE order_attributes SET order_info = "O:32:"Address\":8:{s:6:\"street\";s:11:\"Musterstr\";s:12:\"streetNumber\";s:3:\"123\";s:4:\"city\";s:10:\"Musterstadt\";s:3:\"zip\";s:5:\"11111\";s:9:\"firstName\";s:4:\"USA.Firstname\";s:8:\"lastName\";s:5:\"USA.Lastname\";}"  WHERE order_info IS NULL"; 
    PHP Code:
     $query "SELECT USA.Firstname, USA.Lastname
                         FROM User_Shipping_Adress as USA
                               INNER JOIN Order as O
                                     ON O.UserID=USA.UserID
                               INNER JOIN Order_attributes OA
                                     ON O.ID = OA.OrderID
                                   WHERE OA.adress=NULL"

    Is there any possability to pur it together?
    Important, i Must pur USA.firtname,... Into First query on Different places.
    Maybe someone could help me please?
    Best regards

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,617
    Thanks
    80
    Thanked 4,635 Times in 4,597 Posts
    I don't get it. Your first query isn't CLOSE to legal.

    It should START with something like:
    Code:
    "UPDATE order_attributes SET order_info = 'O:32:\\\"Address\\\":8:{s:6:\\\"street\\\";s:11:..."
    Or some other way to make sure you have a legal SQL query.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •