1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

MySQL INSERT INTO does INSERT, but says has not.

Discussion in 'MySQL' started by pictureboarduk, Mar 8, 2009.

  1. #1
    Hi,

    I am inserting some data into my database with the following code:



    My problem is that when I view the file in the browser, it says:

    But the data is being placed into the database.

    This has confused me, can anyone see why this is occurring?


    Many thanks! :)
     
    pictureboarduk, Mar 8, 2009 IP
  2. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    it's because $sqlcommandvar is undefined..

    maybe you want to do this

     
    fairuz.ismail, Mar 8, 2009 IP
    pictureboarduk likes this.
  3. pictureboarduk

    pictureboarduk Well-Known Member

    Messages:
    551
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Thankyou fairuz :)

    I thought the logic was ok aswell.

    Nice 1

    +ve rep
     
    pictureboarduk, Mar 8, 2009 IP
  4. peterCx

    peterCx Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hotelID is numberic yes or no ?
     
    peterCx, Mar 10, 2009 IP
  5. ProtegeSales

    ProtegeSales Guest

    Messages:
    88
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Can't be he said it's inserting. If it wasn't inserting then the problem you are thinking might have been the solution. '$var' <-- correct if it's not INT.
     
    ProtegeSales, Jan 30, 2010 IP