Join Bill Weinman for an in-depth discussion in this video Creating a database library, part of PostgreSQL 9 with PHP Essential Training.
As you've seen in this chapter, a simple database wrapper library can be a…very convenient thing.…Let's take a closer look at the library we've been using in this chapter so you…can see what's involved in creating your own.…So down here in this lib folder in the Exercise Files, you'll notice a file…called bwPgSQL.php, and that's the library that we've been using throughout this chapter.…I am going to open that in the editor.…I'm just going to say this at the outset: you are welcome to use this however you see fit.…
If you do redistribute it, if you do make any modifications to it, I just ask…that you leave these comments up at the top here, so people will know where it came from.…So it starts out by declaring the class bwPgSQL and some private variables that…are used throughout the library, and then we have the constructor.…You'll notice at the top of each function I have a little usage so that when I…look at this I know how to use that particular function.…So this is the constructor, and it gets passed a user, a password, a…
- 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.