Login Register




The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


concretostranslucidos.com filter_list
Author
Message
concretostranslucidos.com #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) ? '&nbsp;' : $field);
$c2++;
}
$c2 = 0;
$c1++;
}

return $array;
}
[Image: yTHZBDS.png]

Reply

RE: concretostranslucidos.com #2
I like the part where the details don't work.

Reply

RE: concretostranslucidos.com #3
(02-27-2013, 10:52 PM)amus3d Wrote: I like the part where the details don't work.

How are you trying to connect?
I happen to think you have been greatly rude before even knowing what you're doing.
[Image: ud9AJPF.png]
Check into things a bit better next time.
[Image: yTHZBDS.png]

Reply