MySQL Forums
Forum List  »  PHP

Re: Query command doesn't work unless I enter a customerid
Posted by: Keith Scholefield
Date: July 25, 2016 07:20PM

Peter Brawley Wrote:
-------------------------------------------------------
> Review the MySQL manual pahge for Insert syntax.
> Don't quote column names. To have MySQL assign an
> auto_increment value, leave that column name off
> the column list.
>
> When trapping for errors, you might want the user
> to see a generic message like the one you show,
> but to debug and support the app, you need the
> info from mysqli_error().


I left the column name off and it still did not work I used:

$query = "insert into propertylet values
('".$area."', '".$type."', '".$address."', '".$postcode."', '".$town."', '".$price."', '".$locate."', '".$jpg."', '".$name."')";

any ideas?

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.