Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6608355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:36:03+00:00 2026-05-25T19:36:03+00:00

I made table with some Boolean fields. CREATE TABLE PM_ADMIN_LIST( id INT UNSIGNED AUTO_INCREMENT

  • 0

I made table with some Boolean fields.

CREATE TABLE PM_ADMIN_LIST(
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(250) NOT NULL,
password VARCHAR(250) NOT NULL,
mail VARCHAR(250) NOT NULL,
added_time INT,
super_admin VARCHAR(250) NOT NULL,
last_time INT,
last_ip VARCHAR(250),
see_user_per BOOLEAN DEFAULT FALSE,
change_user_per BOOLEAN DEFAULT FALSE,
see_people_per BOOLEAN DEFAULT FALSE,
change_people_per BOOLEAN DEFAULT FALSE,
add_people_per BOOLEAN DEFAULT FALSE,
remove_people_per BOOLEAN DEFAULT FALSE,
see_album_per BOOLEAN DEFAULT FALSE,
add_album_per BOOLEAN DEFAULT FALSE,
change_album_per BOOLEAN DEFAULT FALSE,
remove_album_per BOOLEAN DEFAULT FALSE,
see_music_per BOOLEAN DEFAULT FALSE,
add_music_per BOOLEAN DEFAULT FALSE,
change_music_per BOOLEAN DEFAULT FALSE,
remove_music_per BOOLEAN DEFAULT FALSE,
admin_per BOOLEAN DEFAULT FALSE,
yahoo_per BOOLEAN DEFAULT FALSE,
status_per BOOLEAN DEFAULT FALSE,
pm_per BOOLEAN DEFAULT FALSE,
ip_blocking_per BOOLEAN DEFAULT FALSE
);

But when I check it in phpmyadmin, BOOLEAN fields are tinyint(1) and they are 0 by default. I can make 1 to be TRUE. But when I use === in my PHP code, they can’t be converted. (I should use == in if, for, while and I think it can make some bug in my system.)

So, how should I solve it? How should I get it BOOLEAN by default from mysql?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:36:04+00:00Added an answer on May 25, 2026 at 7:36 pm

    You usually don’t get anything but strings in PHP when fetching data from the database. The types are solely used on the database side.

    The field is a TINYINT because MySQL doesn’t contain a BOOLEAN field at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've made some changes in the table structure and especially the relationships between tables
I have a table that has a composite key that consists of two int
I have made a table and contents some values, I have a button coding
I have a table made up of thead and tbody elements. I have some
i have made columns in some of the tables encrypted in sql server 2008.
In the page Toggle Squares , I have a table made out of an
This is more like a question of principle. I made a table with 100%
Made solution change: I am trying to display a html table of data.. In
Hi I made this site a while ago in my table days but have
I have made a dump of my database in which one table is pretty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.