close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

changing varchar count

Thread began 4/02/2019 11:25 am by Patrice | Last modified 4/03/2019 9:12 am by Ray Borduin | 751 views | 4 replies |

PatriceWebAssist

changing varchar count

PowerStore> users table.
Client wants to limit the number of characters in a company name, etc. It is currently set to varcher(100). He wants it set to 35. So far so good. However, since the cart has been active for a couple of years, there are some companies with longer than 35 characters, so phpMyAdmin is not allowing the change. Is there a way to force the change? Alternately, is there a way to search in the cart admin for longer names? I didn't see a way yet.

One way maybe for me to set up a page that reflects all the companies in a list, associated with the ID, then change directly in the db.

Any other ideas, most appreciated.

Sign in to reply to this post

PatriceWebAssist

I set up a page to reflect the ID number and the field names. The client can use the ID number to find the customer, then edit each longer entry, then I can reset the varchar as needed.

But if anyone knows an easier way, please share. Thanks much.

Sign in to reply to this post

Ray BorduinWebAssist

Just run the SQL statement: UPDATE users SET CompanyName = SUBSTRING(CompanyName , 1, 35)

Sign in to reply to this post
Did this help? Tips are appreciated...

PatriceWebAssist

Thanks so much Ray. Probably above my pay grade to get it done. There are 3 fields on 2 carts. I'll check with client to see if I can open a ticket with you.

I did set up the visual pages for client to see what is what, and I think they are working thru finding the longer names manually in the ID user search. I suspect they can get it done that way. Fingers crossed. Once they cut back on the field content, I will be able to change from 100 to 35 varchar. If it doesn't work out, then I will open a ticket. Thank you.

Sign in to reply to this post

PatriceWebAssist

I figured out how to do it. I ran tests on my demo cart. I used the following

UPDATE ps4_users SET UserCompany = SUBSTRING(UserCompany , 1, 35)

UPDATE ps4_users SET UserAddress = SUBSTRING(UserAddress , 1, 35)

UPDATE ps4_users SET UserAddress2 = SUBSTRING(UserAddress2 , 1, 35)

And then, that allowed me to set from 100 to 35. Thanks for your help, Ray.

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