close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

You have an error in your SQL syntax

Thread began 9/19/2009 11:37 pm by james276087 | Last modified 9/25/2009 2:35 pm by james276087 | 3376 views | 12 replies |

james276087

You have an error in your SQL syntax

Now i have this message for my database:

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 '-code='09650', typelicense='a', endors='passanger with air', experance='10 years' at line 1

You might recognized me by name James
Now i am able to Log in and see my Profile page, but after i entered the data i got this message....again Help
thanks for reading this message
James

Sign in to reply to this post

Jason ByrnesWebAssist

The error is occurring because you are using a hyphen in your column name "zip-code".

MySLQ sees the hyphen as a Minus sign, so the name "zip-code" is interpreted as "zip minus code"


In naming column in your mySQL database, you should use only alpha numeric characters, the only exception being the Underscore (_). Try renaming the zip-code column to either "zipCode" or "zip_code"

Sign in to reply to this post

james276087

thank you Jason

Sign in to reply to this post

james276087

not redirect to Profile page again??

Jason,

I said it " almost there" but need more help....

After change " zip_code" but Log In Page doesn't redirect to Profile Page.
But On Log In page show " array(0) { } ".
After test for session management on my server, don't i have to remove those code???

thanks again,
James

Sign in to reply to this post

Jason ByrnesWebAssist

You can remove The following code from the login page that was added:
<pre><?php var_dump($_SESSION); ?></pre>


I am not able to register a new user to test, your registration page is still using the zip-code column.

Sign in to reply to this post

james276087

How are you? Jason

I did remove the code from Login page.
I didi change the zip code before, copied from database column

zip_code int(10)


thanks

Sign in to reply to this post

Jason ByrnesWebAssist

I am trying to register at:
members_Registration.php



the registration page is still using the zip-code column. I get an error when trying to register:
Unknown column 'zip-code' in 'field list'


after changing the column name in the database, you should rebuild the security assist pages.

Sign in to reply to this post

james276087

Jason,

after changing the column name in the database, you should rebuild the security assist pages.


Do you mean i have start all over again....???

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, the security assist code was generated for a column named zip-code, it needs to be regenerated for the column named zip_code.

the easiest way to accomplish this is to recreate your pages using the wizard.


The not so easy way is to go into each server behavior on the pages created and rebind the zip_code column.

Sign in to reply to this post

james276087

I will

Jason,

OK it is good to practice, i will go over very carefully and remember that my mistakes.
It was very nice to work(?) with you and again thanks for your time and patient.
Wish me Good Luck.....Next time i might post " I DID IT"...

James

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...