close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Unknown Column

Thread began 11/02/2009 2:28 pm by steven348539 | Last modified 11/02/2009 5:19 pm by steven348539 | 925 views | 4 replies |

steven348539

Unknown Column

I read similar posts to my problem, but I don't see a solution I can implement as I don't know how to make the dropdown lists for State/Country to come of the database.

On the confirm.php page I am getting an "Unknown column 'MI' in 'field list'"

It appears that that the code is calling a function to change the abbreviation to a number:

php:
WA_eCDB_ConvertNumber("".((isset($_POST["state_province"]))?$_POST["state_province"]:"")  ."") .


However, it appears it's trying to insert the abbreviation into the SQL database, which is an int column. I've not studied php before and I'm using the pages as they are generated by the checkout wizard.

Sign in to reply to this post

Jason ByrnesWebAssist

The problem is that the state column in your database is set to be a numeric column, but you are trying to inert text.

In the database, change the state column to a text column, then edit the eCart Store Order Summary server behavior, select the sate column and change the data type to text.

Sign in to reply to this post

steven348539

I had thought of that already, however, I am using the Blue Sky sample database that the tutorial used instead of creating a whole new database as that contained most of the needed data.

So, when you try to change the variable from Int to Varchar, MySql complains about MySQL Error Number 1064.

Sign in to reply to this post

Jason ByrnesWebAssist

when you change it to a varchar field, you need to specify a length for the field as well. since it will hold a state abbreviation, use 2 or 4

Sign in to reply to this post

steven348539

argh

Sorry, was getting a little frustrated, but found out why it wasn't let me change it from int(10) to varchar(4). MySQL automatically inserts the closing ) where MSSQL doesn't, so I was having 2 )'s in the command, which of course, would give a syntax error.

So, after seeing that, changing a few more things, it appears it is working now. Well, still have to test the paypal link...

Sign in to reply to this post

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...