Join Bill Weinman for an in-depth discussion in this video Using math functions, part of PostgreSQL 9 with PHP Essential Training.
- View Offline
- Exercise Files
Postgres provides a rich set of mathematical operators and functions as you can…see here in the Postgres documentation.…We have the operators up there which we talk about in a different movie in this chapter.…And here's a full list of the mathematical functions that are available, quite a…few, very complete and trigonometric functions as well.…We are going to take a look down a couple of simple examples of how you can…use this in your SQL.…So bring up SID here and we will start just by creating a table in the test database.…
We get a couple of integers, and we will insert some values.…1 and 2 and 3 and 4, maybe with a couple of negative values as well, -1 and -2, and…we will take look at them.…
So there's the values that we've inserted into our little table. And now if we…want to we can look at the absolute value of these which means that even for the…negative values it will show us their positive equivalence.…Look at the absolute value of a and just b by itself and meant to make these 3 and 4, didn't I?…
- 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.