close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Boolean option - MySQL, PHP Noob

Thread began 12/14/2009 11:04 am by walt125013 | Last modified 12/14/2009 3:45 pm by CraigR | 1323 views | 2 replies |


Boolean option - MySQL, PHP Noob

I am creating a MySQL database and need to be able to have a checkbox that assigns a record as featured. I just want my user to be able to check this box to make the record appear on the homepage in a "Featured" box.

When a user logs into the adminportion of their site, they should be able to check a box in the form. How is this setup in MySQL? Specifically when using phpMyAdmin...

does this make sense?

Sign in to reply to this post

Justin Nemeth

I would use an int column, default value of 0 to indicated unchecked. Then in your PHP code, if the box is checked set the value to 1, set to 0 for unchecked.


Sign in to reply to this post

CraigRBeta Tester

i don't know if this is the 'right' way, but for checkboxes, i create a field of type tinyint with a length of 1 in my database, and have 0 representing unchecked and 1 representing checked.

on my page, the checkbox has a checked value of 1

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





Ease of use


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