Page 1 of 1

creating tables in php leads to errors in phpmyadmin....

Posted: Wed 06 Aug 2014, 11:06
by sayhello_to_the_world
what is dificult in creating this tables...

Code: Select all

CREATE TABLE `pois` (
  `id` bigint(20) unsigned NOT NULL,
  `lat` float(10,7) NOT NULL,
  `lon` float(10,7) NOT NULL,
  PRIMARY KEY (`id`)
)

CREATE TABLE `pois_tag` (
  `poisid` int(11) NOT NULL DEFAULT '0',
  `tagname` varchar(45) NOT NULL DEFAULT '',
  `tagvalue` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`poisid`,`tagname`)
)
i get back the following error ;

Code: Select all

MySQL meldet: Dokumentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version
for the right syntax to use near 'CREATE TABLE `pois_tag` (
  `poisid` int(11) NOT NULL DEFAULT '0',
  `tagname`' at line 8

many thanks for any and all help

Posted: Wed 06 Aug 2014, 11:14
by ebisu

Posted: Wed 06 Aug 2014, 20:36
by technosaurus
Programming is in the Off-Topic Area, so here is a little table humor, that I hope you find funny rather than eye-opening.

Image

Any particular reason it looks like you are using backticks instead of single quotes??? That could be it, but then again I never felt the need to use backticks.