Skip to content

Instantly share code, notes, and snippets.

@simplyniceweb
Last active March 28, 2016 15:35
Show Gist options
  • Save simplyniceweb/aa2a3471016a08f4f2c0 to your computer and use it in GitHub Desktop.
Save simplyniceweb/aa2a3471016a08f4f2c0 to your computer and use it in GitHub Desktop.
getting order list simple php/sql query
public function getOrderList() {
if ( ! empty( $_SESSION['userSession'] ) ) {
$values = array( ":uid" => $_SESSION['userSession'] );
$stmt = $this->conn->prepare("SELECT * FROM tbl_orderlist WHERE CustomerID = :uid");
$stmt->execute($values);
$row = $stmt->fetchAll();
// Uncomment this to debug
// echo "<pre>";
// print_r( $row );
return $row;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment