รบกวนผู้รู้เรื่อง SQL แนะนำหน่อย

เริ่มโดย 9dap, 30 ตุลาคม 2009, 14:24:00

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

9dap

ผมเจอปัญหานี้ครับบ

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 ต่อด้วยชื่อข้อมูลเราครับ)' at line 1

ไม่ทราบว่าเกิดจากอะไร และจะแก้ปัญหาได้ยังไงครับ   :wanwan017:

warut21

"You have an error in your SQL syntax" ตามนั้นครับ คำสั่ง sql ผิดรึเปล่าเขียนว่าไงบ้างอะครับ
[direct=http://www.taradasungha.com]ซื้อขายอสังหาริมทรัพย์ บ้าน คอนโด ที่ดิน[/direct]
[direct=http://www.taradasungha.com/ตลาดนัดออนไลน์]ลงประกาศฟรี ซื้อขายสินค้าออนไลน์[/direct]
[direct=http://www.thaihomeeasy.com]ซื้อขายบ้านง่ายๆ[/direct]
[direct=http://www.thaicondoeasy.com]คอนโด[/direct]
[direct=http://www.phuketsweettravel.com]phuket travel[/direct]

bamboolabcode

อ้างถึงจาก: warut21 ใน 30 ตุลาคม 2009, 14:35:47
"You have an error in your SQL syntax" ตามนั้นครับ คำสั่ง sql ผิดรึเปล่าเขียนว่าไงบ้างอะครับ

ขอดู query หน่อยได้ป่าวคับ

9dap

อ้างถึงจาก: bamboolabcode ใน 30 ตุลาคม 2009, 14:39:13
อ้างถึงจาก: warut21 ใน 30 ตุลาคม 2009, 14:35:47
"You have an error in your SQL syntax" ตามนั้นครับ คำสั่ง sql ผิดรึเปล่าเขียนว่าไงบ้างอะครับ

ขอดู query หน่อยได้ป่าวคับ

-- โครงสร้างตาราง frind_comment`
--

CREATE TABLE `frind_comment` (
  `id` int(3) unsigned zerofill NOT NULL auto_increment,
  `user` int(3) NOT NULL,
  `detail` text NOT NULL,
  `name` int(3) NOT NULL,
  `date` int(16) NOT NULL,
  `ip` varchar(50) NOT NULL,
  `active` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=tis620 AUTO_INCREMENT=1 ;

ขอคำแนะนำหน่อยครับ

Host ของผม

phpMyAdmin - 2.8.2.4

    * MySQL client version: 5.0.83

bamboolabcode

อ้างถึงจาก: Dejavoo ใน 30 ตุลาคม 2009, 14:45:03
อ้างถึงจาก: bamboolabcode ใน 30 ตุลาคม 2009, 14:39:13
อ้างถึงจาก: warut21 ใน 30 ตุลาคม 2009, 14:35:47
"You have an error in your SQL syntax" ตามนั้นครับ คำสั่ง sql ผิดรึเปล่าเขียนว่าไงบ้างอะครับ

ขอดู query หน่อยได้ป่าวคับ

-- โครงสร้างตาราง frind_comment`
--

CREATE TABLE `frind_comment` (
  `id` int(3) unsigned zerofill NOT NULL auto_increment,
  `user` int(3) NOT NULL,
  `detail` text NOT NULL,
  `name` int(3) NOT NULL,
  `date` int(16) NOT NULL,
  `ip` varchar(50) NOT NULL,
  `active` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=tis620 AUTO_INCREMENT=1 ;

ขอคำแนะนำหน่อยครับ

Host ของผม

phpMyAdmin - 2.8.2.4

    * MySQL client version: 5.0.83

ผมลองเอาไปสร้างดูแล้วมันได้นิคับ  :P

warut21

สร้างได้เหมือนกันครับ query ไม่น่าผิด แต่ผมใช้ version 5.0.84 นะครับ
[direct=http://www.taradasungha.com]ซื้อขายอสังหาริมทรัพย์ บ้าน คอนโด ที่ดิน[/direct]
[direct=http://www.taradasungha.com/ตลาดนัดออนไลน์]ลงประกาศฟรี ซื้อขายสินค้าออนไลน์[/direct]
[direct=http://www.thaihomeeasy.com]ซื้อขายบ้านง่ายๆ[/direct]
[direct=http://www.thaicondoeasy.com]คอนโด[/direct]
[direct=http://www.phuketsweettravel.com]phuket travel[/direct]

9dap

ขอบคุณทุกคำตอบครับ ยังเจออยู่แต่ไม่ทุกครั้งครับ

ijeed

-- โครงสร้างตาราง frind_comment`
--

CREATE TABLE `frind_comment` (
  `id` int(3) unsigned zerofill NOT NULL auto_increment,
  `user` int(3) NOT NULL,
  `detail` text NOT NULL,
  `name` int(3) NOT NULL,
  `date` int(16) NOT NULL,
  `ip` varchar(50) NOT NULL,
  `active` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=tis620 AUTO_INCREMENT=1 ;

ลองลบตัวแดงออกครับ
[direct=https://www.xn--72caic4dq4dbbh8hb1cya5b0a1nng.com]รับซื้อทองเชียงราย[/direct]
[direct=https://www.xn--72ch0bkxyb6fb6adv1d1hnf.com]รับซื้อทองพะเยา[/direct]
[direct=https://www.xn--42cfblc6eta3ebbi7ib5c0a8b1a0ob7o.com]รับซื้อทองเคเชียงราย[/direct]
[direct=https://www.xn--72cfac8eza4abbed7i1bya5b0a8md9n.com]รับซื้อเพชรเชียงราย[/direct]
[direct=https://www.xn--b3cb8brbybe1g8adv1dwhf0l.com]รับซื้อเพชรพะเยา[/direct]

9dap

อ้างถึงจาก: ijeed ใน 30 ตุลาคม 2009, 20:11:58
-- โครงสร้างตาราง frind_comment`
--

CREATE TABLE `frind_comment` (
  `id` int(3) unsigned zerofill NOT NULL auto_increment,
  `user` int(3) NOT NULL,
  `detail` text NOT NULL,
  `name` int(3) NOT NULL,
  `date` int(16) NOT NULL,
  `ip` varchar(50) NOT NULL,
  `active` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=tis620 AUTO_INCREMENT=1 ;

ลองลบตัวแดงออกครับ

ผมขอเอาไปลงองก่อนนะครับ รอดูผลว่าเป็นไง

9dap

อ้างถึงจาก: Dejavoo ใน 30 ตุลาคม 2009, 23:56:32
อ้างถึงจาก: ijeed ใน 30 ตุลาคม 2009, 20:11:58
-- โครงสร้างตาราง frind_comment`
--

CREATE TABLE `frind_comment` (
  `id` int(3) unsigned zerofill NOT NULL auto_increment,
  `user` int(3) NOT NULL,
  `detail` text NOT NULL,
  `name` int(3) NOT NULL,
  `date` int(16) NOT NULL,
  `ip` varchar(50) NOT NULL,
  `active` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=tis620 AUTO_INCREMENT=1 ;

ลองลบตัวแดงออกครับ

ผมขอเอาไปลงองก่อนนะครับ รอดูผลว่าเป็นไง

ใช้ได้แล้วขอบคุณมากครับ

pomchai


powerbeer001

น่าจะเป็นที่เวอร์ชั่นไม่ support เปล่า
อ้างถึง
[direct=https://www.examvify.com] ระบบฐานข้อมูลข้อสอบและห้องสอบออนไลน์ฟรี [/direct]

อ้างถึง
[direct=https://www.posvis.com] โปรแกรมบริหารร้านค้า POS ฟรี [/direct]

sungzee