|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
mysql insert help
I'm new at mysql and I'm having trouble inserting into my database. I've checked several tutorials and still cannot get it to work. Maybe I'm doing something wrong here that I'm not noticing, could someone please help? The code here: http://arcanewill.com/pmtest.txt
Thanks in advance to whoever helps. |
|
#2
|
|||
|
|||
|
RE: mysql insert help
Hello
I have tried the above link but get a "Page Not Found". Pryce |
|
#3
|
|||
|
|||
|
RE: mysql insert help
I apoligize for the mistake, apparently I forgot to upload the file to the server. It's there now and the link works, thanks for looking.
|
|
#4
|
|||
|
|||
|
RE: mysql insert help
What error are you getting and where?
Please can you post the exact output you are getting. Thank you Pryce |
|
#5
|
|||
|
|||
|
RE: mysql insert help
The error comes in the addComment function when the form is submitted. The error received is the one specified in the function itself (Error storing comment in database). If I don't specify to display an error message, it doesn't insert into the database and does not show any indication of an error.
|
|
#6
|
|||
|
|||
|
RE: mysql insert help
try changing the insert query as follows
$query = "INSERT INTO pcomment (poemid,name,comment) VALUES ('$id', '$name', '$comment')"; and see if that helps. I assume the id filed from this table is autoincrement, so you do not have to do anything except insert into the db to get the number to generate. |
|
#7
|
|||
|
|||
|
RE: mysql insert help
Thanks for the help, Blindeddie. I originally didn't specify null for the id because it autoincrements, but I was missing the single quotes around the individual values, putting those in worked.
|
|
#8
|
|||
|
|||
|
RE: mysql insert help
glad you got it sorted
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > mysql insert help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|