Php SQL查询未正常运行
我尝试运行以下代码。但是,什么也没有发生。可能是sql查询不正确(很可能是引号)。我无法找出确切的问题。请帮助Php SQL查询未正常运行,php,mysql,sql,Php,Mysql,Sql,我尝试运行以下代码。但是,什么也没有发生。可能是sql查询不正确(很可能是引号)。我无法找出确切的问题。请帮助 <?php $server = 'localhost'; $login='event'; $pass='A1B1'; $db='eventcar_db'; $conndb=mysqli_connect($server,$login,$pass,$db) or die ("DB connection failed because:" . mysqli_error($con
<?php
$server = 'localhost';
$login='event';
$pass='A1B1';
$db='eventcar_db';
$conndb=mysqli_connect($server,$login,$pass,$db) or die ("DB connection failed because:" . mysqli_error($conndb));
mysqli_query($conndb,"INSERT INTO `tbl_event` (`event_id`, `paypal_charges`, `tax`, `convences_charges`, `mem_id`, `category_id`, `category_links`, `event_name`, `event_friendly_url`, `event_date_start`, `event_time_start`, `event_date_end`, `event_time_end`, `event_type`, `country`, `city`, `address`, `url`, `event_listing`, `email_ids`, `event_ticketed`, `doing_ticket_through_us`, `ticket_type`, `ticket_url`, `total_tickets`, `min_tickets`, `maxt_tickets`, `ticket_price`, `name_of_account`, `account_number`, `account_type`, `bank_name`, `bank_address`, `ifsc_code`, `event_logo`, `event_details`, `organizer_name`, `organizer_logo`, `organizer_details`, `event_viewed`, `zipcode`, `event_url`, `facebook_url`, `youtube_url`, `twitter_url`, `status`, `post_date`, `most_popular`, `event_approval_status`) VALUES (NULL, '0', '0', '0', '0', '16', '16', 'Suraj Jagan live in Concert', 'suraj-jagan-live-in-concert', '2014-06-08', '7:30 PM', '2014-06-08', '9:30 PM', 'Offline', 'India', 'Ahmedabad', 'At B J Medical college, Civil Hospital, Ahmedabad, Gujarat, India.', '', 'Public', NULL, 'Yes', 'No', NULL, NULL, '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'description', '', NULL, NULL, '0', NULL, 'http:/abc.com/event/xyz', '', '', '', '1', '2014-05-30', '0', '1');");
echo 6
echo mysqli_insert_id();
?>
将其添加到查询中,并查看错误或die(mysqli_error())代码>我看到了代码>作为错误结束,或者像@echo_Me所说的那样尝试
afterecho 6
注意:1)避免在列名区域中使用单引号,并直接在数据库中尝试此查询;2)检查列类型并输入数据