PHP Classes

MySQL MSSQL Connect: Execute queries on MySQL and Microsoft SQL queries

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 181 All time: 8,702 This week: 206Up
Version License PHP version Categories
mysqlmssqlconn 1.0The PHP License5PHP 5, Databases
Description 

Author

This is a simple class can that can execute queries on MySQL and Microsoft SQL queries.

It provides two separate classes that can connect respectively to a MySQL or a Microsoft SQL database server.

The classes also provide functions with the same names to execute database queries, retrieve then number of rows in the query results, and retrieve the query result records into an array.

In Spanish:

Estas dos sencillas Clases que permiten conectarse de igual manera a Servidores Mysql o servidores MS SQL SERVER.

Comparten la misma estrutura, funciones, solo se diferencían en dos cosas,en la instancia y la conectividad.

Picture of Milton de Jesús Flores Torres
Name: Milton de Jesús Flores ... <contact>
Classes: 1 package by
Country: Mexico Mexico
Age: 47
All time rank: 420250 in Mexico Mexico
Week rank: 249 Up5 in Mexico Mexico Up

Example

<?php
include('ConexionMySQL_I.php');

$db = new mySQL; // Creamos la instancia del objeto mysql

$strSQL = "SELECT * FROM educators";
$result = $db->executeQuery($strSQL);

$educatorsN = getNumRows($result);

if(
$educatorsN > 0)
{
  while(
$row = $db->fetchArray($result))
  {
    echo
"Educador No. {$row[0]}, Nombre: {$row[1]}";
  }
// fin de while
}else{
   echo
"No hay educadores en la DB";
}

?>


// MS SQL SERVER


<?php
include('ConexionMSSQL.php');

$db = new msSQL; // Creamos la instancia del objeto MS SQL SERVER

$strSQL = "SELECT * FROM educators";
$result = $db->executeQuery($strSQL);

$educatorsN = getNumRows($result);

if(
$educatorsN > 0)
{
  while(
$row = $db->fetchArray($result))
  {
    echo
"Educador No. {$row[0]}, Nombre: {$row[1]}";
  }
// fin de while
}else{
   echo
"No hay educadores en la DB";
}

?>


  Files folder image Files  
File Role Description
Plain text file ConexionMSSQL.php Class msSQL Class Connect
Plain text file ConexionMySQL_I.php Class mySQL Class Connecy
Accessible without login Plain text file ejemplos.php Example EJEMPLO / SAMPLE

 Version Control Unique User Downloads Download Rankings  
 0%
Total:181
This week:0
All time:8,702
This week:206Up
User Comments (1)
Still using mysqli.
4 years ago (Ken Turnbull)
15%Star