Thanks, I thought that was it but wanted to make sure.
Main Topics
Browse All TopicsI'm new to PHP and I'm confused at this syntax. It's from a site I'm working on.
$result = mysql_query($sql,$cn) or handle_mysql_query($sql,my
usually when I define a variable i just do something like:
$result = mysql_query($sql,$cn)
and I'll only use "or" in a conditional statement. What does the "or" do in the above statement. Which value is assigned to "$result" or are both values assigned to it?
Thanks
The full code chunk is below:
<!-- --------------- Start Seven Table Here -------------------->
<?
$str.="<br>
<table align=center width=100%>";
/* from references page, use as reference
$sqlref="select * from `references` where u_id='".$id."' order by ref_id " ;
$resultref = mysql_query($sqlref) or die(mysql_error()); */
$sql="select * from references where u_id='".$id."' order by ref_id ";
$result = mysql_query($sql,$cn) or handle_mysql_query($sql,my
$rowcount=mysql_num_rows($
if($rowcount!=0)
{
$str.="<tr align=left>
<td width=95% align=left colspan=2><font face=$face class=fsx05><b>References<
</tr>";
while($rs=mysql_fetch_obje
{
$str.="<font $size face=$face>
<table width=\"51%\" border=\"0\">
<tr>
<td colspan=\"2\">$rs->ref_nam
</tr>
<tr>
<td width=\"10%\"> </td>
<td width=\"90%\">$rs->ref_add
</tr>
<tr>
<td> </td>
<td>$rs->ref_add2</td>
</tr>
<tr>
<td> </td>
<td>$rs->ref_add3</td>
</tr>
<tr>
<td>Phone: </td>
<td>$rs->phone</td>
</tr>
</table>
</font>";
}
}
$str.="</table>"; ?>
<!-- --------------- End Seven Table Here -------------------->
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: mms_masterPosted on 2009-06-05 at 01:00:51ID: 24554113
Hi,
It is used to catch any errors. mysql_query will run and if it has any errors handle_mysql_query will be called and have the sql statement and mysql error passed to it.
mms_master