Skip to content

Instantly share code, notes, and snippets.

@johnmorris
Created December 15, 2014 16:01
Show Gist options
  • Save johnmorris/17919f785e2caff296ed to your computer and use it in GitHub Desktop.
Save johnmorris/17919f785e2caff296ed to your computer and use it in GitHub Desktop.
Using ezSQL in PHP and MySQL projects
<?php
// Be sure to configure your file paths according to YOUR setup below
// Watch the associated videos here: https://www.youtube.com/playlist?list=PLLs69n7Q4dCx5_7ZwnxTymH8X0iRP_2vw
require_once( dirname( __FILE__ ) . '/config.php' );
require_once( dirname( __FILE__ ) . '/shared/ez_sql_core.php' );
require_once( dirname( __FILE__ ) . '/mysqli/ez_sql_mysqli.php' );
$db = new ezSQL_mysqli(DB_USER, DB_PASS, DB_NAME, DB_HOST, DB_ENCODING);
print_r($db->get_results("SELECT * FROM objects"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment