PHP Using PHP with MySQL Limiting Records in SQL Queries Using COUNT

jo vo
jo vo
Pro Student 4,830 Points

Echo $error-message

Wouldnt it be smart to write an error message variable inside database.php?

It gets really old to have to write: "could not retrieve data from the database" everytime.

For example: $error-message: "Could not retrieve the data from the database";

and then echo $error-message in all the different php files

2 Answers

Yes, it's smart. :)

Jamie Goodwin
Jamie Goodwin
14,251 Points

Yeah totally had that idea as well. Even considered it as a function just to practice the process. Stay curious Jo.