MySQL Forums
Forum List  »  PHP

Re: sql query in php
Posted by: Fernando Figueroa
Date: March 12, 2009 09:52PM

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

Options: ReplyQuote


Subject
Written By
Posted
March 12, 2009 03:52AM
Re: sql query in php
March 12, 2009 09:52PM
March 13, 2009 12:47PM


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.