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 2308
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 crimeSUCCESSCRY S 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 crimeSUCCESSCRY S
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)
Dormilich 8,658
Recognized Expert Moderator Expert
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.
The purpose of the code is simply to delete a record and then redirect back to the page where the delete was started. The code looks like this:
elseif ($_GET == "delete")
{
$query = "delete from product_subcategory2 where product_sku=$_GET and...
|
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 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> select database();
+------------+
| database() |
+------------+
|
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 "Incorrect
syntax near the keyword 'and'." or "System.Data.SqlClient.SqlException:
Incorrect syntax near the keyword 'and'."
instead of:
|
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
ERROR: parser: parse error at or near "$1" at character 58
create or replace function "fn_insert_entry_pending"(varchar,varchar,varchar,varchar,varchar,boolean,boolean,date,int,int) returns integer as '
declare
|
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 including the -q64 option in
xlC compiler. And we are able to link all these libraries to one of
the main applications and generate an executable. SKLoader. But, when
we try to run this main executable, we are getting the following
errors:
| |
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 syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1".
Problem is I can't see any " near line. And it worked fine the first time. What am I missing?
Thankyou.
<?php
...
|
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 corresponds to your MySQL server version for the right
syntax to use near 'mysqlimport merchandise 1.txt' at line 1")
args = (1064, "You have an error in your SQL syntax. Check
the...se near 'mysqlimport merchandise 1.txt' at line 1")
|
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 exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax...
|
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 an exception occours which is-
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
|
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 data entry page. I have copied an existing page and created a new table in my database. When I run the script I get the error message "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right...
|
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,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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();...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| | |