hi
i have an error with enter record to table in database(mysql)
structure of my table is as follow
and i wanted to insert into this table with this statement
that ' ..\\uploaded_fi le\\pic_71.gif' is address of picture is uploaded
but i get an error as follow
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'current_time,m ark,seri,photo, price,guaranty, state_guaranty, available,creat e_date' at line 1
I check table and my insert statement for this error for several time but I dont understand reason of this error.
please help me that what is reason of this error?
thanks alot
i have an error with enter record to table in database(mysql)
structure of my table is as follow
Code:
- phpMyAdmin SQL Dump -- version 2.11.6 -- [url]http://www.phpmyadmin.net[/url] -- -- Host: localhost -- Generation Time: Jan 21, 2009 at 12:12 PM -- Server version: 5.0.51 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `shop_mobile` -- -- -------------------------------------------------------- -- -- Table structure for table `tbl_phone` -- CREATE TABLE `tbl_phone` (`id_phone` INT NOT NULL AUTO_INCREMENT, `username` varchar(20) NOT NULL, `current_time` varchar(20) NOT NULL COMMENT 'زمان ورود رکورد', `mark` varchar(20) character set utf8 collate utf8_unicode_ci NOT NULL COMMENT 'برند', `seri` varchar(20) NOT NULL COMMENT 'سری', `photo` varchar(60) NOT NULL COMMENT 'عکس', `price` varchar(10) NOT NULL COMMENT 'قیمت', `guaranty` varchar(30) character set utf8 collate utf8_unicode_ci NOT NULL COMMENT 'گارانتی', `state_guaranty` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'وضعیت گارانتی', `available` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'موجود بودن گوشی', `create_date` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تاریخ معرفی گوشی', `frequence` varchar(20) default NULL COMMENT 'باند فرکانس', `dimension_phone` varchar(20) default NULL COMMENT 'ابعاد گوشی', `weight_phone` varchar(10) default NULL COMMENT 'وزن گوشی', `look_phone` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'شکل ظاهری گوشی', `color_phone` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'رنگ های گوشی', `type_screen` varchar(20) default NULL COMMENT 'نوع صفحه نمایش', `count_color_screen` varchar(20) default NULL COMMENT 'تعداد رنگهای صفحه نمایش', `transparency_screen` varchar(10) default NULL COMMENT 'وضوح صفحه نمایش', `external_screen` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'صفحه نمایش خارجی', `dimension_screen` varchar(10) default NULL COMMENT 'ابعاد صفحه نمایش', `diagnose_handwiting` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تشخیص دست نوشته', `type_alarm` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'نوع زنگ', `recieve_alarm` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'دریافت زنگ', `vibrate` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'لرزاننده', `telephonebook` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'دفترچه تلفن', `report_call` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'گزارش تماس', `internal_memory` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'حافظه داخلی', `card_memory` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کارت حافظه', `card_memory_mobile` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کارت حافظه همراه', `type_card_memory` varchar(20) default NULL COMMENT 'نوع کارت حافظه', `enhance_memory` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'قابلیت ارتقا', `properties_else` varchar(60) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'خصوصیات دیگر حافظه', `bluetooth` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'بلوتوث', `ifrared` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مادون قرمز', `usb` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'USB', `mathching_computer` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تطبیق با کامپیوتر', `type_message` varchar(30) default NULL COMMENT 'دریافت پیام', `wireless_network` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'شبکه بی سیم', `browser_internet` varchar(30) default NULL COMMENT 'مرورگر اینترنت', `GPRS` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'GPRS', `HSCSD` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'HSCSD', `EDGE` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'EDGE', `threeG` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT '3G', `quality_photo` varchar(20) default NULL COMMENT 'کیفیت عکس', `dimension_photo` varchar(20) default NULL COMMENT 'ابعاد عکس', `zoom_photo` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'بزرگنمائی', `flash_photo` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فلاش', `record_film` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فیلمبرداری', `record_film_time` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مدت فیلمبرداری', `dimension_film` varchar(20) default NULL COMMENT 'ابعاد فیلم', `auto_focus` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فوکوس خودکار', `second_camera` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'دوربین دوم', `picture_call` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تماس تصویری', `type_lens` varchar(20) default NULL COMMENT 'نوع لنز', `os` varchar(20) default NULL COMMENT 'سیستم عامل', `cpu` varchar(20) default NULL COMMENT 'cpu', `distribute_film` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پخش فیلم', `distribute_music` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پخش موسیقی', `radio` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'رادیو', `working_office_document` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کار با پرونده های آفیس', `working_pdf_document` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کار با پرونده های پی دی اف', `pin_output_sound` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پایه خروجی صدا', `distribute_loud_sound` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پخش با صدای بلند', `oclock` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'ساعت', `alarm_oclock` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'زنگ هشدار', `java` varchar(20) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'java', `game` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'بازی', `game_install` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'نصب بازی', `anticipate_word` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پیش بینی کلمه', `command_voice` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فرمان صوتی', `dialing_voice` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'شماره گیر صوتی', `record_sound` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'ضبط صدا', `output_tv` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'خروجی تلویزیون', `management_person` varchar(60) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مدیریت اطلاعات شخصی', `edit_photo` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'ویرایش عکس', `sensor_moving` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'سنسور حرکتی', `special_popular_properties` varchar(60) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مشخصات ویژه این مدل', `type_battery` varchar(40) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'نوع باتری', `dialog` varchar(20) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مکالمه', `waiting` varchar(20) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'انتظار',PRIMARY KEY(`id_phone`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `tbl_phone` --
Code:
INSERT INTO tbl_phone (username,current_time,mark,seri,photo,price,guaranty,state_guaranty,available,create_date,frequence,dimension_phone,weight_phone,look_phone,color_phone,type_screen,count_color_screen,transparency_screen,external_screen,dimension_screen,diagnose_handwiting,type_alarm,recieve_alarm,vibrate,telephonebook,report_call,internal_memory,card_memory,card_memory_mobile,type_card_memory,enhance_memory,properties_else,bluetooth,ifrared,usb,mathching_computer,type_message,wireless_network,browser_internet,GPRS,HSCSD,EDGE,threeG,quality_photo,dimension_photo,zoom_photo,flash_photo,record_film,record_film_time,dimension_film,auto_focus,second_camera,picture_call,type_lens,os,cpu,distribute_film,distribute_music,radio,working_office_document,working_pdf_document,pin_output_sound,distribute_loud_sound,oclock,alarm_oclock,java,game,game_install,anticipate_word,command_voice,dialing_voice,record_sound,output_tv,management_person,edit_photo,sensor_moving,special_popular_properties,type_battery,dialog,waiting) VALUES
('ali123','2009-January-31','nokia','11000','..\\uploaded_file\\pic_71.gif','11000','no','','no','2004 January','','','','','','','','','no','','no','','no','no','','no','','no','no','','','','no','no','no','no','','no','','no','no','no','no','','','no','no','no','','','no','no','no','','','','no','no','no','no','no','no','no','no','no','no','no','no','no','no','no','no','no','','no','no','','','','no' )
that ' ..\\uploaded_fi le\\pic_71.gif' is address of picture is uploaded
but i get an error as follow
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'current_time,m ark,seri,photo, price,guaranty, state_guaranty, available,creat e_date' at line 1
I check table and my insert statement for this error for several time but I dont understand reason of this error.
please help me that what is reason of this error?
thanks alot
Comment