Join Bill Weinman for an in-depth discussion in this video Replacing strings within strings, part of PostgreSQL 9 with PHP Essential Training.
Postgres provides standard functions for replacing strings within strings. For example…I can do this, SELECT REPLACE and I give the source string ('This is a string'.…And then the part of the string that's going to be replaced 'is a'); with the…replacement 'is not a' and when I execute that I get this is not a string.…So that's probably most common way to do this.…There's another interesting function called Overlay and while many large…database systems have something like this,…this is the particular Postgres way to do it.…
I can say OVERLAY and let's just take the word string here and replace it with…xxxxxx and say PLACING and I do not want this comma here, 'string' FROM and I…happen to know that that's 11 characters in and so I am going to say Go and now…it says this is a string and so it's taken this xxxx which is 11 characters in…and it's placed this string there.…
So this is possibly another useful function.…It's something to have in your tool kit,…you probably won't use it as often as the Replace function.…
- 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.