works in ocalhost but not in my website
Posted: Tue Mar 09, 2010 1:47 pm
Please look at the following code. It works localy but not in my website.
It works with
But i need the Aluno record
Any ideas?
Code: Select all
<?php
$mysql_id = mysql_connect('localhost', 'xxx', 'xxx');
mysql_select_db('mariolopes',$mysql_id);
$query1="select Aluno,sum(N_horas) as totas from registo_horas";
$result1=mysql_query($query1);
while ($row1=mysql_fetch_array($result1)){
echo $row1[totas];
}
?>
Code: Select all
$query1="select sum(N_horas) as totas from registo_horas";
Any ideas?