php - Fatal error: Call to a member function bind_param() error -
i trying insert data table getting frustrating error couldn't figure wrong. error below:
fatal error: call member function bind_param() on non-object
i have read means prepare returning false.. here code error occuring
$insert = $mysqli->prepare("insert `hm_desktop`(`username`, `title`, `condition`, `description`, `price`, `brand`, `color`, `hard_drive_capacity`, `others`, `graphics_card`, `ram_capacity`, `operating_system`, `os_edition,` `processor_type`, `processor_speed`, `model`, `product_series`, `included_items`, `country`, image_one, image_two, image_three, image_four, image_five, `date`) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); $insert->bind_param('sssssssssssssssssssss', $username, $title, $cond, $desc, $price, $brand, $color, $hard_drive_type, $others, $garphics_card, $ram_capacity, $operating_system, $os_edition, $processor_type, $processor_speed,$model, $product_series, $included_items, $country, $random_name_generated, $i2, $i3, $i4, $i5, $date); $insert->execute();
i have tried hours nothing seems working.. missing here? please help
you have mistake in sql.
the comma after os_edition
inside backticks, should outside:
....ating_system`, `os_edition,` `processor... ....ating_system`, `os_edition`, `processor...
that, , @aynber said s
's, variables , graphics_card.
Comments
Post a Comment