Join Bill Weinman for an in-depth discussion in this video Converting numbers, part of PostgreSQL 9 with PHP Essential Training.
Postgres provides a single very powerful function for converting numerics to…strings and this is TO CHAR.…And you will notice here on this page, there are a number of different forms of…it and all the way down at the bottom here because it's so flexible and does so…many different things, you'll see the different options and template characters…and template patterns for formatting numbers and a number of examples as well.…So let's just take a look at a couple very simple examples of this.…We will start with a number, and I will just say go and you will see that it just…echoes the number back and of I want to format this I can say city TO CHAR, and…take that number and put in a format string.…
Make sure I have enough digit spaces and you will notice the format is the number with…commas in place and enough digits after the decimal point.…Now if I take out some use digits after the decimal point you will notice that…it simply truncates them, it's not actually rounding off.…There's another simple form of this called TO HEX, type in TO_HEX and just put…
- 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?
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.