concretostranslucidos.com 02-26-2013, 04:18 AM
#1
http://www.concretostranslucidos.com
function conect()
{
$host = "66.116.150.171";
$user = "distrib_concreto";
$password = "ConCre12";
$connection = mysql_connect($host, $user, $password);
mysql_select_db($base, $connection);
mysql_query("SET NAMES 'iso-8859-1'");
return $connection;
}
function get_array($query) //Returns an array with the results of a query in the form
//$array[key][row] being key the name of the column
{
$connection = conect();
$result = mysql_query($query, $connection) or die(mysql_error());
$number_cols = mysql_num_fields($result);
for($i=0; $i < $number_cols; ++$i)
{
$cols[$i] = mysql_field_name($result, $i);
}
$c1 = 0;
$c2 = 0;
while($row=mysql_fetch_row($result))
{
foreach($row as $field)
{
$array[$cols[$c2]][$c1] = (is_null($field) ? ' ' : $field);
$c2++;
}
$c2 = 0;
$c1++;
}
return $array;
}
function conect()
{
$host = "66.116.150.171";
$user = "distrib_concreto";
$password = "ConCre12";
$connection = mysql_connect($host, $user, $password);
mysql_select_db($base, $connection);
mysql_query("SET NAMES 'iso-8859-1'");
return $connection;
}
function get_array($query) //Returns an array with the results of a query in the form
//$array[key][row] being key the name of the column
{
$connection = conect();
$result = mysql_query($query, $connection) or die(mysql_error());
$number_cols = mysql_num_fields($result);
for($i=0; $i < $number_cols; ++$i)
{
$cols[$i] = mysql_field_name($result, $i);
}
$c1 = 0;
$c2 = 0;
while($row=mysql_fetch_row($result))
{
foreach($row as $field)
{
$array[$cols[$c2]][$c1] = (is_null($field) ? ' ' : $field);
$c2++;
}
$c2 = 0;
$c1++;
}
return $array;
}
![[Image: yTHZBDS.png]](http://i.imgur.com/yTHZBDS.png)


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
![[Image: ud9AJPF.png]](http://i.imgur.com/ud9AJPF.png)