Sorry, in MySQL have i dont plan..... I have this make :
mysql_select_db ( string $database_DO, [, resource $link_identifier = NULL ] ) : bool
and this is before :
mysql_select_db($database_DO, $DO);
and the next error is a parse error :(
Error :
Parse error: syntax error, unexpected '$database_DO' (T_VARIABLE), expecting ')' in E:\XAMPP\htdocs\index.php on line 3
htdocs/index.php
<?php require_once('Connections/DO.php'); ?>
<?php
mysql_select_db ( string $database_DO [, resource $link_identifier = NULL ] ) : bool
$query_Cuentas = "SELECT * FROM cuentas";
$Cuentas = mysql_query($query_Cuentas, $DO) or die(mysql_error());
$row_Cuentas = mysql_fetch_assoc($Cuentas);
$totalRows_Cuentas = mysql_num_rows($Cuentas);
?>
<?php include("includes/head.tpl"); ?>
<?php include("includes/variables.php"); ?>
<?php if ((isset($_GET['action'])) &&($_GET['action']=="error_login")){
include("includes/error_login.php");
}else{
}
?>
htdocs/Connections/Do.php
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_DO = "127.0.0.1";
$database_DO = "do_es";
$username_DO = "root";
$password_DO = "";
$DO = mysqli_connect($hostname_DO, $username_DO, $password_DO) or trigger_error(mysql_error(),E_USER_ERROR);
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
?>
PHP okay, but MySQL ? check i dont :/
Sorry for my bad english ;)