|
Posted by Sergey Groshev on 10/10/85 11:39
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title></title>
<META http-equiv=Content-Type content="text/html; charset=windows-1251">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
body {
margin: 5px 5px 5px 5px;
background-color: #ffffff;
}
/* ========== Text Styles ========== */
hr { color: #000000}
body, table /* Normal text */
{
font-size: 9pt;
font-family: 'Courier New';
font-style: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
span.rvts1 /* Heading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #0000ff;
}
span.rvts2 /* Subheading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #000080;
}
span.rvts3 /* Keywords */
{
font-size: 10pt;
font-family: 'Arial';
font-style: italic;
color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
span.rvts6
{
font-weight: bold;
color: #800000;
}
span.rvts7
{
font-size: 8pt;
font-family: 'arial';
font-style: italic;
color: #c0c0c0;
}
a.rvts8, span.rvts8
{
font-size: 8pt;
font-family: 'arial';
color: #0000ff;
text-decoration: underline;
}
/* ========== Para Styles ========== */
p,ul,ol /* Paragraph Style */
{
text-align: left;
text-indent: 0px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
..rvps1 /* Centered */
{
text-align: center;
}
--></style>
</head>
<body>
<p>Hello</p>
<p><br></p>
<p>try this</p>
<p><br></p>
<p>$result= mysql_db_query($database,"Select * from category where id=$id and (sponsor='0' or sponsor=$userid)")</p>
<p><br></p>
<p><span class=rvts6>> How do I combine the two following statements where I am selecting</span></p>
<p><span class=rvts6>> everything from "category" where id=$id and sponsor='0' or $userid ?</span></p>
<p><br></p>
<p><span class=rvts6>> Thanks for any help!</span></p>
<p><br></p>
<p><span class=rvts6>> $result = mysql_db_query($database, "SELECT * FROM category WHERE</span></p>
<p><span class=rvts6>> id=$id and sponsor='0'");</span></p>
<p><br></p>
<p><span class=rvts6>> $result = mysql_db_query($database, "SELECT * FROM category WHERE</span></p>
<p><span class=rvts6>> id=$id and sponsor=$userid");</span></p>
<p><br></p>
<p><br></p>
<p><span class=rvts7>-- </span></p>
<p><span class=rvts7>Regards</span></p>
<p><span class=rvts7> Sergey </span><a class=rvts8 href="mailto:e2144c@motorola.com">mailto:e2144c@motorola.com</a></p>
</body></html>
[Back to original message]
|