Join Bill Weinman for an in-depth discussion in this video Storing Boolean values , part of PostgreSQL 9 with PHP Essential Training.
Postgres provides a dedicated Boolean type.…It's is not really very efficient for storage--it uses an entire byte for each…value--but it's good to know how it works so that you can use it in other non-storage contexts.…So here's a table with two columns, both of the Boolean type, and you'll notice…the one of them spells out the word BOOLEAN and one of them is using the…abbreviated BOOL. And both of these are acceptable and they both work. And then I…have inserted some various values.…You will notice that you can use true and false as keywords.…
You can use 1 and 0 as string values.…You can use true or the letter t, also strings; false, the letter f; yes, the…letter y; no, the letter n; and these will correspond to Boolean values.…So go ahead and select Go, and you see here are our values.…So we get a one for true and we get a blank for false. And so in the first…column we have the keywords TRUE and FALSE, so we get a 1 and a blank.…In the second row we have the '1' and '0' in quote marks for strings, and we…
- Installing PostgreSQL
- Understanding database architecture
- Inserting, updating, and deleting data in a table
- Creating a database library
- Indexing ID fields
- Storing numbers, text, and Boolean values
- Reading data
- Using casts to force type
- Using mathematical functions
- Concatenating strings
- Working with date and time functions and operators
- Defining CRUD
- Using PHP to insert, read, update, and delete rows in a database
Skill Level Beginner
PHP with MySQL Beyond the Basicswith Kevin Skoglund10h 26m Intermediate
1. Quick Start
2. Creating a Database
3. Data Types
4. Storing and Reading Data
5. SQL Expressions
6. Mathematical Functions and Operators
Using math functions3m 2s
7. String Functions and Operators
8. Date and Time Functions and Operators
9. PHP Interfaces
10. Web Applications
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.