0
$sql = "INSERT INTO kladilnica (Username, Uplata, Dobivka, Date, regTime, Odds, isActive, ticket_id, isShared, is_wined, Location) VALUES ('".$user."', '".$bet."', '".$gain."', '".$date."', '".$regTime."' '".$odds."', 1, $randomTicketID, 0, 0, '".$userLocation."')";
$result = $conn->query($sql);
trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);

I searched on google and found that you need to have equal fields and values in the SQL. But sudently i have that but it gives me the same error again Column count doesn't match value count at row 1

3
Contributors
4
Replies
15
Views
1 Year
Discussion Span
Last Post by Stefan_1
0

NO WAY haha OMG :D btw now gives me another error which idk what is it
Fatal error: Wrong SQL: INSERT INTO kladilnica (Username, Uplata, Dobivka, Date, regTime, Odds, isActive, ticket_id, isShared, is_wined, Location) VALUES ('s', '100', '200', '2016-07-07', '03:07:32pm', '300', 1, 567899149, 0, 0, 'Russia') Error: in C:\xampp\htdocs\bootstrap\navigation.php on line 257 line 257 is the same SQL in this post

Edited by Stefan_1

0

Actyally i needed to remove the trigger_error and all works good :D

Edited by Stefan_1

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.