This command will not insert data into this table. Is it worng coz it looks fine to me and it inserts data into other tables but just not this one, what could be the problem. This table was also created after I had used my database for sometime
mysql_query("INSERT INTO SAMPLE VALUES( NULL, last_insert_id, '$contactname', '$siteaddress', '$phonenumber', NULL, '$website', '$code', '$postaladress', '$jobIDarray')") or die (mysql_error());
2 1550
This command will not insert data into this table. Is it worng coz it looks fine to me and it inserts data into other tables but just not this one, what could be the problem. This table was also created after I had used my database for sometime
mysql_query("INSERT INTO SAMPLE VALUES( NULL, last_insert_id, '$contactname', '$siteaddress', '$phonenumber', NULL, '$website', '$code', '$postaladress', '$jobIDarray')") or die (mysql_error());
Hi there,
Is there any error message / code being prompt? Check the datatype, hope it helps. Good luck & Take care.
I am almost sure the LAST_INSERT_ID is the cause. Is this insert preceeded by another insert? At least you must spell it LAST_INSERT_ID() (parentheses at the end), it is a function, not a column name.
Ronald :cool:
Sign in to post your reply or Sign up for a free account.
Similar topics
by: J. Muenchbourg |
last post by:
The block of code below shows how I am inserting field values into my
dbase table:
strSQLStatement = "INSERT INTO tblArticles
(handid,ArticleDate,sport,articleheader, fpick,articleText) "_
&...
|
by: soni29 |
last post by:
hi,
i have a small question regarding sql, there are two tables that i
need to work with on this, one has fields like:
Table1:
(id, name, street, city, zip, phone, fax, etc...) about 20 more...
|
by: shumaker |
last post by:
I'm wondering how/why this query works. Trying to get my head wrapped
around SQL. Basically the Query deletes from the Import table all
records that are already in FooStrings so that when I do an...
|
by: serge |
last post by:
I have a scenario where two tables are in a One-to-Many relationship
and I need to move the data from the Many table to the One table so
that it becomes a One-to-One relationship.
I need to...
|
by: Klemens |
last post by:
I get SQL30090 reason 18 by trying to do an insert in a federated table and
an update in a local table in one transaction
Do I have to change some settings to get done or ist this not possible by...
|
by: Howard Kaikow |
last post by:
I got bored today, so I decided to rewrite the code in KB article 316383 to
decrease the number of object references.
This resulted in a number of nested With ... End With.
The original code had...
|
by: Jack |
last post by:
Hi,
I am gathering the input values to a form using Request.form method from the
processing page. After all the data is captured, I am building sql statement
out of it. Using a response.write...
|
by: ryushinyama |
last post by:
I had to do a lot of searching to get this one to work and in doing so I saw a lot of different sites where people were looking for this answer so I thought I would put it up.
If you are trying...
|
by: tracy |
last post by:
Hi, I really need help.
I run this script and error message appeal as below:
drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG'...
|
by: Red |
last post by:
If auto-format is turned off in VS2008, there is apparently no way to
indent a line. Under Tools->Options->Text Editor->C#->Formatting,
there are three checkboxes. Unchecking those seems to cause...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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: 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: 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: 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...
| |