> MySQL returns "Column 'auction_house' cannot be null". > Here're some parts of my code: > > --- code --- > > $update = $this->sql->stmt_init(); > $update->prepare("UPDATE auctions SET name=?, auction_house=?, link=?, > prize=?, runtime=?, bids=?, picture=? WHERE link=?"); > $update->bind_param("sisdsiss", $auction_parts["name"], > $auction_house["id"], $auction_parts["link"], $auction_parts["prize"], > $auction_parts["runtime"], $auction_parts["bids"], > $auction_parts["picture"], $auction_parts["link"]); > > $insert = $this->sql->stmt_init(); > $insert->prepare("INSERT INTO auctions (auction_house, name, link, > prize, runtime, bids, picture) VALUES (?, ?, ?, ?, ?, ?, ?)"); > $insert->bind_param("issdsis", $auction_house["id"], > $auction_parts["name"], $auction_parts["link"], $auction_parts["prize"], > $auction_parts["runtime"], $auction_parts["bids"], > $auction_parts["picture"]); > > --- /code --- > > after this, there's the loop, in which I do either $update->execute(); > or $insert->execute(); - the $update->execute(); runs without problems > but the $insert->execute runs into the described problem. So at some point the $auction_parts['id'] is empty. As you go into the loop, print out the $auction_house["id"], then work backwards... -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php