Re: sql query in php
Hi Rick,
Well, i've used MySQL & Php and i don't know, i think that problem could be in PHP,
i going to put an example according with your query=>
$query=mysql_query("SELECT * From payments, members WHERE payments.CardNumber=members.CardNumber AND Year = '2009' ",$conexion);
$num_rows=mysql_num_rows($query);
echo "<script>alert(\"$num_rows\")</script>"; //Print the number or rows selected
<table width="700" border="1" align="center" bordercolor="#333333">
<?php
while ($row=mysql_fetch_array($query))
{?>
<tr>
<td bordercolor="#CCCCCC"><div align="center"><font color="#FFFFFF"><?php echo $row['payments'];?></font></div></td>
<td bordercolor="#CCCCCC"><div align="center"><font color="#FFFFFF"><?php echo $row['members'];?></font></div></td>
</tr>
<?php }?>
</table>
Is there any doubt just tell me.
Fernando Figueroa
PHP & MySQL Web Development
Subject
Written By
Posted
Re: sql query in php
March 12, 2009 09:52PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.