473,651 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

an error in insert into table

oranoos3000
107 New Member
hi
i have an error with enter record to table in database(mysql)
structure of my table is as follow


Expand|Select|Wrap|Line Numbers
  1. - phpMyAdmin SQL Dump
  2. -- version 2.11.6
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Jan 21, 2009 at 12:12 PM
  7. -- Server version: 5.0.51
  8. -- PHP Version: 5.2.6
  9.  
  10. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  11.  
  12.  
  13. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  14. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  15. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  16. /*!40101 SET NAMES utf8 */;
  17.  
  18. --
  19. -- Database: `shop_mobile`
  20. --
  21.  
  22. -- --------------------------------------------------------
  23.  
  24. --
  25. -- Table structure for table `tbl_phone`
  26. --
  27.  
  28. CREATE TABLE `tbl_phone` (`id_phone` INT NOT NULL AUTO_INCREMENT, `username` varchar(20) NOT NULL,
  29.   `current_time` varchar(20) NOT NULL COMMENT 'زمان ورود رکورد',
  30.   `mark` varchar(20) character set utf8 collate utf8_unicode_ci NOT NULL COMMENT 'برند',
  31.   `seri` varchar(20) NOT NULL COMMENT 'سری',
  32.   `photo` varchar(60) NOT NULL COMMENT 'عکس',
  33.   `price` varchar(10) NOT NULL COMMENT 'قیمت',
  34.   `guaranty` varchar(30) character set utf8 collate utf8_unicode_ci NOT NULL COMMENT 'گارانتی',
  35.   `state_guaranty` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'وضعیت گارانتی',
  36.   `available` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'موجود بودن  گوشی',
  37.   `create_date` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تاریخ معرفی گوشی',
  38.   `frequence` varchar(20) default NULL COMMENT 'باند فرکانس',
  39.   `dimension_phone` varchar(20) default NULL COMMENT 'ابعاد گوشی',
  40.   `weight_phone` varchar(10) default NULL COMMENT 'وزن گوشی',
  41.   `look_phone` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'شکل ظاهری گوشی',
  42.   `color_phone` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'رنگ های گوشی',
  43.   `type_screen` varchar(20) default NULL COMMENT 'نوع صفحه نمایش',
  44.   `count_color_screen` varchar(20) default NULL COMMENT 'تعداد رنگهای صفحه نمایش',
  45.   `transparency_screen` varchar(10) default NULL COMMENT 'وضوح صفحه نمایش',
  46.   `external_screen` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'صفحه نمایش خارجی',
  47.   `dimension_screen` varchar(10) default NULL COMMENT 'ابعاد صفحه نمایش',
  48.   `diagnose_handwiting` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تشخیص دست نوشته',
  49.   `type_alarm` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'نوع زنگ',
  50.   `recieve_alarm` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'دریافت زنگ',
  51.   `vibrate` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'لرزاننده',
  52.   `telephonebook` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'دفترچه تلفن',
  53.   `report_call` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'گزارش تماس',
  54.   `internal_memory` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'حافظه داخلی',
  55.   `card_memory` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کارت حافظه',
  56.   `card_memory_mobile` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کارت حافظه همراه',
  57.   `type_card_memory` varchar(20) default NULL COMMENT 'نوع کارت حافظه',
  58.   `enhance_memory` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'قابلیت ارتقا',
  59.   `properties_else` varchar(60) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'خصوصیات دیگر حافظه',
  60.   `bluetooth` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'بلوتوث',
  61.   `ifrared` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مادون قرمز',
  62.   `usb` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'USB',
  63.   `mathching_computer` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تطبیق  با کامپیوتر',
  64.   `type_message` varchar(30) default NULL COMMENT 'دریافت پیام',
  65.   `wireless_network` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'شبکه بی سیم',
  66.   `browser_internet` varchar(30) default NULL COMMENT 'مرورگر اینترنت',
  67.   `GPRS` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'GPRS',
  68.   `HSCSD` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'HSCSD',
  69.   `EDGE` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'EDGE',
  70.   `threeG` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT '3G',
  71.   `quality_photo` varchar(20) default NULL COMMENT 'کیفیت عکس',
  72.   `dimension_photo` varchar(20) default NULL COMMENT 'ابعاد عکس',
  73.   `zoom_photo` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'بزرگنمائی',
  74.   `flash_photo` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فلاش',
  75.   `record_film` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فیلمبرداری',
  76.   `record_film_time` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مدت فیلمبرداری',
  77.   `dimension_film` varchar(20) default NULL COMMENT 'ابعاد فیلم',
  78.   `auto_focus` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فوکوس خودکار',
  79.   `second_camera` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'دوربین دوم',
  80.   `picture_call` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'تماس تصویری',
  81.   `type_lens` varchar(20) default NULL COMMENT 'نوع لنز',
  82.   `os` varchar(20) default NULL COMMENT 'سیستم عامل',
  83.   `cpu` varchar(20) default NULL COMMENT 'cpu',
  84.   `distribute_film` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پخش فیلم',
  85.   `distribute_music` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پخش موسیقی',
  86.   `radio` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'رادیو',
  87.   `working_office_document` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کار با پرونده های آفیس',
  88.   `working_pdf_document` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'کار با پرونده های پی دی اف',
  89.   `pin_output_sound` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پایه خروجی صدا',
  90.   `distribute_loud_sound` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پخش با صدای بلند',
  91.   `oclock` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'ساعت',
  92.   `alarm_oclock` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'زنگ هشدار',
  93.   `java` varchar(20) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'java',
  94.   `game` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'بازی',
  95.   `game_install` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'نصب بازی',
  96.   `anticipate_word` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'پیش بینی کلمه',
  97.   `command_voice` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'فرمان صوتی',
  98.   `dialing_voice` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'شماره گیر صوتی',
  99.   `record_sound` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'ضبط صدا',
  100.   `output_tv` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'خروجی تلویزیون',
  101.   `management_person` varchar(60) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مدیریت  اطلاعات شخصی',
  102.   `edit_photo` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'ویرایش عکس',
  103.   `sensor_moving` varchar(30) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'سنسور حرکتی',
  104.   `special_popular_properties` varchar(60) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مشخصات ویژه این مدل',
  105.   `type_battery` varchar(40) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'نوع باتری',
  106.   `dialog` varchar(20) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'مکالمه',
  107.   `waiting` varchar(20) character set utf8 collate utf8_unicode_ci default NULL COMMENT 'انتظار',PRIMARY KEY(`id_phone`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  108.  
  109. --
  110. -- Dumping data for table `tbl_phone`
  111. --
and i wanted to insert into this table with this statement

Expand|Select|Wrap|Line Numbers
  1. 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 
  2. ('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
Feb 3 '09 #1
1 2889
Atli
5,058 Recognized Expert Expert
Hi.

The word "current_ti me" is a reserved keyword in MySQL.
Try enclosing it in back-ticks, like it is in your CREATE TABLE query.
Feb 4 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
8247
by: Robert Rae | last post by:
OS XP Pro SP2 MYSQL Ver: 5.0.0-alpha nt Whenever I view a table or run a query in the Control Center (0.9.4-beta) I get the following error: ERROR 1146: Table 'shipnet.1' doesn't exist table shipnet.1 indeed does not exist but I can't understand why it's looking for it. Any ideas?
6
9007
by: Dino Vliet | last post by:
Hi there, I want to put a number of records (variable number depending on a attribute of a table) into a certain table with a trigger statement. I have created the follwing trigger: CREATE FUNCTION vullalles() RETURNS trigger AS ' BEGIN FOR i in 0..7 LOOP
3
2444
by: tyngtyng | last post by:
hi... i'm new to the php and now i'm getting an error to insert my data inside the form..and also undefined index in latest_updated...... Now,i'm having trouble catching what i'm doing wrong....Here's my code to the query entry... <?php include 'config.php'; $pili_id=$_POST; $branch=$_POST;
10
21466
by: ineedahelp | last post by:
Can anyone help me figure out why I continue to get a runtime error '3010' "TABLE qryMultiSelect ALREADY EXISTS'? Here is my code. thank you in advance for any help!!! Private Sub cmbSelectionDone_Click() Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim varItem As Variant Dim strCriteria As String Dim strSQL As String
1
2487
by: quartz | last post by:
Hello, I have a txt file with names, years, days. How can I insert table using shell scripting??? Thenks a lot,
2
1637
by: jongerb | last post by:
Hello, I've been working on taking data from a form and inserting it to a table if the record doesn't exist and updating it if the record does exists. All the data is in textboxes and a comboboxes. I have button that when clicked runs an sql statement in visual basic. When I click the button error '3129' appears stating that "Invalid SQL statement; Expected INSERT, DELETE, UPDATE ..." Please help. Private Sub Command93_Click() Dim strSQL...
1
2307
by: JoeKid09 | last post by:
Hi Guys, Thanks in advance for your help. I unpivoted a table which I want to insert into another table. Below is my script. I got an error; anyone can see where my error is. insert into MASTER_FINANCIALS ( , , ,FINANCIAL_DESC ,FINANCIAL_VALUES
5
2014
by: tvnaidu | last post by:
Getting an error "table insert failed for eventLog" any idea what is the reason?, I have this table called "eventLog", earlier DB comesup, now I saved more data and I am getting the above error when it is loading tables. thanks
0
1482
by: tvnaidu | last post by:
database file gets created using below sql file, then lua script calls "db.import config_ascc", then I get errors says "insert table failed for eventLog", below are my sql file entry, config file, also import and saveTable function, any idea what is wrong, why I get error?. thanks in advance. system.sql file ========== CREATE TABLE eventLog ( component text NOT NULL,
3
2650
by: tvnaidu | last post by:
When I do INSERT like below, value is a string with apastrophe (for ex: "Checking for 'hlt' instruction"), insert throws an error - how to fix? INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...)
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
7294
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1905
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.