Any SQL experts here?

Marc

TPer Emeritus
Suspended / Banned
Messages
34,670
Edit My Images
Yes
I'm setting up a new website and the contact page is giving me a major headache.

Because the contact page is actually a way of the client requesting a quote, I need a database setting up in order to store the details. I've done this via my hosting but I'm now getting the following error when I click submit.

Screenshot2011-01-06at101809.png


Problem is, I don't have any knowledge of SQL so haven't a clue what it all means.
 
You have an error in the insert code :) Looking at it the Organisation = '' looks slightly suspect. Change to =' ' and the phone and others which are essentially blank and see if that helps.

Also depending on how you're doing the insert, having spaces in variable names could be a recipe for problems.

If someone else wrote the code ask them to fix it!
 
I'd use someone else's software to be honest. If this is this bad when you set it up then imagine what it's going to be like when punters use it!
 
Hi

This is my first post here after lurking for a good while so hopefully it will be a useful one :)

After the Details = 'stuff that I need' part of the SQL it seems to carry on inserting fields but doesn't specify the field name, for example

PHP:
= '92.11.122.141'
should probably be something like
PHP:
IP = '92.11.122.141'

The organisation field shouldn't be the problem as the error message before the code says that the error is newar the Details field. However if you have control over the SQL you may want to set empty field to null rather than an empty string!

Again, if you have control over the SQL you could also write INSERT's as:

PHP:
INSERT INTO tablename (col1, col2, col3,...) VALUES (val1, val2, val3,...)

Anyway, I hope the above is of some help.
 
It is trying to put a new record in the the `Enquiries` table. After Details = 'stuff again' it is broken and the syntax is rubbish. The field names are absent, it is not saying which field to set to '92.11.122.141', not which one to set to the browser name (Mozilla/5.0 etc), or which to set to NOW() (which presumably is trying to insert the current time)

Whatever is generating that MYSQL command needs attention as it is leaving out the field names. I'm guessing its some php (horrid language).
 
Sadly, I have no knowledge of coding whatsoever. I use Rapidweaver to create websites and, until now, have had no problems with it. This is the first time that SQL has come into it and I don't have any control over it other than the set up process in the myadmin section of the hosting (PHP) and I'm not 100% sure of what I'm doing there although everything appears to be correct. :shrug:
 
It's whatever code rapidweaver is generating for the contact page. It's pants. I'd contact them and have them take you though how to get it working properly. It's paid for software so it should work!
 
I don't think it is down to you. You've filled in the field names properly and the code they are generating is incomplete.

Rapidweaver is designed for people with no coding knowledge so it has to work better than it does and produce meaningful error messages.

I'd try their support as it does look more like their error rather than yours.
 
Marc, are you using a plugin in or native Rapidweaver?

Whatever is compiling the script is making the coding error and you need to turn to the suppliers for support as Suz says.

If it's not urgent we could put some time aside next weekend, or phone me if it's more pressing.
 
I don't think it is down to you. You've filled in the field names properly and the code they are generating is incomplete.

Rapidweaver is designed for people with no coding knowledge so it has to work better than it does and produce meaningful error messages.

I'd try their support as it does look more like their error rather than yours.

I've posted the question on their forum and they're usually pretty good but nowhere near as quick as here.

Marc, are you using a plugin in or native Rapidweaver?

Whatever is compiling the script is making the coding error and you need to turn to the suppliers for support as Suz says.

If it's not urgent we could put some time aside next weekend, or phone me if it's more pressing.

It's native RW Mark. I'm going to see if I can find a workaround because I've got a feeling that I'm putting a lot of effort in (as are you guys) for something that may well give me a lot more than I actually need (wouldn't be the first time!). If not, I may well bend your ear by the penguin enclosure. :D
 
Just as long as you aren't intending to bend a penguin by my ear enclosure!! :lol: :lol:
 
Back
Top