PHP Classes

File: examples/mysql_select.php

Recommend this page to a friend!
  Classes of Everton da Rosa   XtPHP   examples/mysql_select.php   Download  
File: examples/mysql_select.php
Role: Example script
Content type: text/plain
Description: Example script
Class: XtPHP
General purpose library of utility classes
Author: By
Last change:
Date: 9 years ago
Size: 413 bytes
 

Contents

Class file image Download
<?php
//Selecionando dados no Mysql

require '../mysql.php';
require
'../store.php';
require
'../utils.php';

//conectar ao servidor Mysql
if(XtMysql::connect('localhost', 'root', 'lise890', 'xtexample') == false){
    echo
"<p>Ocorreu o seguinte erro ao tentar conectar: ".mysql_error()."</p>";
}else{
   
   
$result = XtMysql::select('tblexample');//seleciona todos os dados da tabela
   
XtUtils::printr($result);
}

?>