Jump to content

A PHP Class for mySQL SELECT


son.of.the.morning

Recommended Posts

Hey guys I want to create a class containing a SELECT statment in order to make in re-usable though out my entire applicion. Any one no a good way to go about this?

 

This is the native way i have done it. I want to be able to make this into a class becuase i have more than one database with the same tables.

                                $articles = "SELECT * FROM blog_posts INNER JOIN users ON blog_posts.aurthor_id=users.user_id
						 INNER JOIN post_categories ON blog_posts.category_id=post_categories.id";
			$articles_results = mysql_query($articles)or die(mysql_error());;

Link to comment
https://forums.phpfreaks.com/topic/252204-a-php-class-for-mysql-select/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.