Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Db Query Returning "Error" ? 
 
Cancel this!  

I wanted to add some more cms/type columns and delete some other columns in config, so I'll just turn them into cms and edit the necessary files! BIG JOB - but what else am I doing?  And would have to add the "new" cms/max anyway

I'm stuck!  

Code: [Download] [Hide] [Select]
Db = PDO:

CREATE TABLE `gnu_max` (
  `max3` tinyint(1) NOT NULL DEFAULT '3',
  `max4` tinyint(1) NOT NULL DEFAULT '4',
  `max5` tinyint(1) NOT NULL DEFAULT '5',
  `max6` tinyint(1) NOT NULL DEFAULT '6',
  `max7` tinyint(1) NOT NULL DEFAULT '7',
  `max8` tinyint(1) NOT NULL DEFAULT '8',
  `max9` tinyint(1) NOT NULL DEFAULT '9',
  `max10` varchar(11) NOT NULL DEFAULT '10',
  `max20` varchar(11) NOT NULL DEFAULT '20',
  `max30` varchar(11) NOT NULL DEFAULT '30',
  `max40` varchar(11) NOT NULL DEFAULT '40',
  `max50` varchar(11) NOT NULL DEFAULT '50',
  `max60` varchar(11) NOT NULL DEFAULT '60',
  `max70` varchar(11) NOT NULL DEFAULT '70',
  `max80` varchar(11) NOT NULL DEFAULT '80',
  `max90` varchar(11) NOT NULL DEFAULT '90',
  `max100` varchar(11) NOT NULL DEFAULT '100'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


Code: [Download] [Hide] [Select]
INSERT INTO `gnu_max` (
VALUES (3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100);




It creates the TABLE Ok, but it doesn't matter how I change the VARS - int, tinyint, mediumint,  bigint, varchar, Always gets the same sort of Error?

I've looked at the Manuals BUT I don't want to join "another" website for one question?

Error

Code: [Download] [Hide] [Select]
SQL query:

INSERT INTO `gnu_max` (
VALUES (3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)

MySQL said: Documentation
#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 'VALUES (3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)' at line 2

TABLE = 17
INSERT = 17

??    
 



 
mortSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Db Query Returning "Error" ? 
 
Hi mort.

This is invalid:

Code: [Download] [Hide]
  1. INSERT INTO `gnu_max` ( 


You need to list the columns there between ( and ), or just remove that (
 




____________
IcyPhoenix ADR RPGEzArena (modded phpBB2+ADR)
 
InformproSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Db Query Returning "Error" ? 
 
No, I'm the problem!  

I left the semi-quote off the end of values.. and it won't install if any of the brackets are removed ?

Here's what works. And there isn't going to be any data - They are just for switching.  

Code: [Download] [Hide] [Select]
CREATE TABLE gnu_max (
  max3 tinyint(1) NULL DEFAULT '3',
  max4 tinyint(1) NULL DEFAULT '4',
  max5 tinyint(1) NULL DEFAULT '5',
  max6 tinyint(1) NULL DEFAULT '6',
  max7 tinyint(1) NULL DEFAULT '7',
  max8 tinyint(1) NULL DEFAULT '8',
  max9 tinyint(1) NULL DEFAULT '9',
  max10 tinyint(1) NULL DEFAULT '10',
  max20 tinyint(1) NULL DEFAULT '20',
  max30 tinyint(1) NULL DEFAULT '30',
  max40 tinyint(1) NULL DEFAULT '40',
  max50 tinyint(1) NULL DEFAULT '50',
  max60 tinyint(1) NULL DEFAULT '60',
  max70 tinyint(1) NULL DEFAULT '70',
  max80 tinyint(1) NULL DEFAULT '80',
  max90 tinyint(1) NULL DEFAULT '90',
  max100 tinyint(1) NULL DEFAULT '100'
)
  ENGINE=MyISAM DEFAULT CHARSET=utf8;

  INSERT INTO gnu_max VALUES (3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100);

 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Db Query Returning "Error" ? 
 
The real Problem was `max3`is SQL - where max3 is PHP
 



 
mortSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron