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

  • Home
  • SEARCH
  • 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

Problem: user made some selection in the multi-selection listbox, then pressed a checkbox, and
I made some alterations to my code, and now it won't function properly. My
I have made some c code for a program, which does some psycho-acoustics on
I have made an SQLite database file with some testdata in it. When I
I need to represent a table containing data about some tests and their results.
I have made a TabViewController In that there is a view with a table
I've got a table which is partially made up of dynamic rows (comes from
In my application, I am using an AsyncTask to write some data to a
I have a table that has worked correctly for many years, but recently the
well i have little knowledge in JavaScript. My idea is to design a grid

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.