I have a Call log that uses php and html interface to keep track of people calling in for various reasons - if I try to put the word 'from' anywhere in one of the fields I get an internal error message 500, not sure why, but every other word I have tried works fine - just kinda stumbled across this.
Other tables in the same database can store the word 'from', and I'm not using it as a field name (reserved words)
Seems like a weird problem to troubleshoot, anyone have experience with this?
os: windows xp
Server version: 4.0.27-standard
UNIX socket
MySQL client version: 4.1.10
6 1529
No, never experienced this. Show your INSERT or UPDATE statement, so we can have a look and try to find some reason.
Ronald :cool:
[PHP]mysql_query("INSERT INTO `Call Log` VALUES ('$date', '$time','$tname','$me','$caller','$c_phone','$prob lem','$resolution','$status','$logger','$priority' ,'$property',NULL, '$vendor', '$address', '$city', '$state', '$zip')") or die(mysql_error()); [/PHP]
[PHP]mysql_query("UPDATE `Call Log` SET `date`='$date', `time`='$time',`t_name`='$tname',`t_index`='$tinde x',`caller`='$caller',`c_phone`='$c_phone',`proble m`='$problem',`resolution`='$resolution',`status`= '$status',`logger`='$logger',`priority`='$priority ',`property`='$property', `vendor`='$vendor', `address`='$address', `city`='$city', `state`='$state',`zip`='$zip' WHERE `index` = '$index' LIMIT 1") or die("Oops".mysql_error()); [/PHP]
The only thing left could be that you store a char value in a numeric type field and the char value happens to be 'from'. Do you know the column on which the error occurs?
Ronald :cool:
normally the difficulty is in the 'problem' or 'resolution' columns since these are html text areas where I can enter a large (more than 255) amount of text (text is the data type of the column - wonder if that is a problem), but I can also try and enter the word 'from' in phpmyadmin and the problem continues - ok here's the error from php myadmin when I try and INSERT anything, it actually does INSERT (when I browse the table), but comes up with this error message
Error
SQL query:
INSERT INTO (
)
VALUES (
), (
)
MySQL said:
#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 '() VALUES (), ()' at line 1
This is a very minor problem, and probably has something to do with the way I structured the table, I'll try and make a new table with similar columns and debug the data types - see if I can narrow it down more... thanks for helping
What worries me is the part of the statement that says
an INSERT has the following format usually - INSERT INTO table (col1, col2, ....coln) VALUES(val1, val2, .... valn);
So I wonder what bthe extra comma and parentheses are doing after the VALUES specification. Can you show us?
Ronald :cool:
yeah, that is weird, that error message generated after using phpmyadmin to INSERT anything into the table, and I can't reproduce that error on another table in phpmyadmin.
I didn't know that you should specify columns before specifying values in the insert method - i'll try putting that in the code
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Simon |
last post by:
Hi
I am trying to produce an update trigger. I understand the concept of
delete and insert triggers without a problem. Unfortuantely, the
update triggers do not have particularly simple...
|
by: Christopher |
last post by:
I AM GETTING A SYSTEM.DATA.SQLCLIENT.SQLEXCEPTION ERROR WHEN ATTEMPTING TO
INSERT DATA INTO A SINGLE TABLE THROUGH A GRID
//If this is due to a spelling error, i will
//inflict a ritual...
|
by: alan |
last post by:
in my project there are
5 textbox : tbOrderid, tbSeqNum, tbFoodCode, tbFoodDesc and tbPrice
9 button: btInsert, btdelete, btUpdate, btClear, btBind, btFirst,
btPrevious, btNext and btLast
i...
|
by: NuB |
last post by:
I have a sql query that is doing an update of records, how can I add NULL to
the field in the database if the field on my screen is blank?
example:
I have 5 textboxes, and a user can leave some...
|
by: Pedro Pinto |
last post by:
Hi there once more........
Instead of showing all the code my problem is simple.
I've tried to create this function:
char temp(char *string){
alterString(string);
return string;
|
by: anson |
last post by:
this code is an example code of TPOP, i type them and can be
compiled...
but when give some input , it getting segment fault ....
i observed that when the build() initial the word table ... it...
|
by: carmen413 via VBMonster.com |
last post by:
Dear All,
my text file like following,
a1, b1, c1, d1, e1
a2, b2, c2, d2, e2
a3, b3, c3, d3, e3
a4, b4, c4, d4, e4
.................
|
by: Terry Olsen |
last post by:
I'm using OleDb to connect with an Access Database. I have anywhere from
10 to over 100 records that I need to either INSERT if the PK doesn't
exist or UPDATE if the PK does exist, all in a single...
|
by: pinko1204 |
last post by:
My Update function cannot successful update to sql table even don't have any error. Please help to check .....thx
PHP1
<?php
require_once 'header.php';
?>
<style type="text/css">
<!--
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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...
|
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,...
|
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...
| |