Hello im making a browser game and have 99% working but iv got one error i cant find / fix and would like to know if anyone can help me where im going wrong heres the error - QUERY ERROR: 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 ' 0, '1', '2121221', '1212121', '12121', '12121', 1211, '121', 121)' at line 1
-
Query was INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP) VALUES( 'fdfdf', '1', '((WILL*0.8)/2.5)+(LEVEL/4)', '12', , 0, '1', '2121221', '1212121', '12121', '12121', 1211, '121', 121)
- '12', , 0, '1', '2121221', '1212121', '12121', '12121', 1211, '121', 121
this is where i would write but for the testing i did anything
here is the coding to the table in mysql - CREATE TABLE `crimes` (
-
`crimeID` int(11) NOT NULL auto_increment,
-
`crimeNAME` varchar(255) NOT NULL default '',
-
-
`crimeBRAVE` int(11) NOT NULL default '0',
-
`crimePERCFORM` text NOT NULL,
-
`crimeSUCCESSMUNY` int(11) NOT NULL default '0',
-
`crimeSUCCESSCRYS` int(11) NOT NULL default '0',
-
-
`crimeSUCCESSITEM` int(11) NOT NULL default '0',
-
`crimeGROUP` int(11) NOT NULL default '0',
-
`crimeITEXT` int(11) NOT NULL default '0',
-
`crimeSTEXT` int(11) NOT NULL default '0',
-
`crimeFTEXT` int(11) NOT NULL default '0',
-
-
`crimeJTEXT` int(11) NOT NULL default '0',
-
`crimeJAILTIME` int(10) NOT NULL default '0',
-
`crimeJREASON` varchar(255) NOT NULL default '0',
-
`crimeXP` int(11) NOT NULL default '0',
-
-
PRIMARY KEY (`crimeID`)
-
) ENGINE=MyISAM ;
errors i get on page using - <?php
-
error_reporting(E_ALL);
-
ini_set('display_errors', true);
- Notice: Undefined index: HTTP_X_FORWARDED_FOR in /home/reddr431/public_html/smoke/header.php on line 111
-
-
Notice: Undefined index: attacking in /home/reddr431/public_html/smoke/header.php on line 120
-
full code for this is attached below
been trying to fix this for a few weeks now
9 2267
maybe the error is related to the type.Could be you are passing a integer or a string where MySQL is expecting the other type.
@guillermobytes
nope tryed changeing it around been looking alot of forums but still no answer
sorry i didn't look at the code, now i see the error, it's the VALUE of crimeSUCCESSCRYS that is not set in the query values.
It may be related to the missing index "attacking" on line 120 in /home/reddr431/public_html/smoke/header.php
the problem is not the table, its the query - Query was INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP) VALUES( 'fdfdf', '1', '((WILL*0.8)/2.5)+(LEVEL/4)', '12', MISSING_VALUE, 0, '1', '2121221', '1212121', '12121', '12121', 1211, '121', 121)
you have no value in crimeSUCCESSCRYS
see where i put MISSING_VALUE
ok done the input again with missing value and still have the error - QUERY ERROR:
-
Query was INSERT INTO 'crimes' ('crimeNAME', 'crimeBRAVE', 'crimePERCFORM', 'crimeSUCCESSMUNY', 'crimeSUCCESSCRYS', 'crimeSUCCESSITEM', 'crimeGROUP', 'crimeITEXT', 'crimeSTEXT', 'crimeFTEXT', 'crimeJTEXT', 'crimeJAILTIME', 'crimeJREASON', 'crimeXP') VALUES( 'name', '1', '((WILL*0.8)/2.5)+(LEVEL/4)', '12', 0, 0, '1', 'intal text', 'success text', 'failure', 'jail', 12, 'reason', 12)
maybe it’s because you want to pass a string to an integer field?
@Dormilich
problem fixed it was a simple code error
this
should have been
i was missing a '.' from the code all works now thanks for your help guys
@icemaster451
wow i have never seen that, plus the error output wasn't redirecting to this part of the code. wierd but glad you solved it
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Steve |
last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone
can explain to me why it was reported that way.
...
|
by: Morten Gulbrandsen |
last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug
Type...
|
by: tshad |
last post by:
If you get an exception or SqlException, how do you get the actual message?
Not the detailed breakdown, but the actual message.
For example, in the following message, I would like to find just...
|
by: Uros |
last post by:
Hello!
I have problem with my function and I can find what's wrong.
WARNING: Error occurred while executing PL/pgSQL function fn_insert_entry_pending
WARNING: line 26 at SQL statement...
|
by: r.nikhilk |
last post by:
Hi,
Currently, we are porting C++ applications from 32 bit to 64 bit on AIX
platform. (The current version of AIX is 5.3 and xlC verison is 8.0).
We are able to compile the applications by...
|
by: beary |
last post by:
Could someone please tell me what's wrong with the code below. It worked fine the first time, then I cleared the table (results) and tried it again, but got the message "You have an error in your SQL...
|
by: moishyyehuda |
last post by:
whey when I execute this statment
cursor.execute("""mysqlimport merchandise 1.txt""")
I get this error
ProgrammingError: (1064, "You have an error in your SQL syntax. Check
the manual that...
|
by: Trez |
last post by:
Hey guys,
Am new at using ASP.Net. am having some problems updating my SQL DB. whenever i try i get this Error. Can someone help me?
Incorrect syntax near 'nvarchar'.
Description: An unhandled...
|
by: ajos |
last post by:
hi evrybdy,
the problem is:-
i had this running before in jsp but when i changed the jsp page using struts tags there occoured a problem...
when i enter values in the 2 text boxes and click enter...
|
by: bobf |
last post by:
I am using a program 'My Contact Table' which is a code generator program. It allows you to easily create a PHP/MySQL web application without writing any code.
I am trying to create an additional...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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,...
| | |