•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,859 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,584 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1311 | Replies: 2
![]() |
Hi all
First thing is that i am new to php and i could get stuck on one semicolen.
OK here is the code that i have problem with and the problem is that results given to both the query are same for some reason and i cant figure it out and i will also post the include file:
PHP
[PHP]//fittings 1"--------------------------------------------
include ("./php_includes/seperator.inc");
echo "<tr>
<td style='border-style:none; border-width:medium; ' colspan='3'>
<b><font size='4' face='Arial' color='#969493'><A NAME='Fitting1'>Handrail Pipe Fittings 1.315' ( IPS 1' )
</font></b>
<font size='2' face='Arial' color='#969493'>
<a href='#Catalog' style='text-decoration: none'><font color='#969493'>
Back To Top</font></a></font></b></td>
</tr>";
$query2 = "SELECT * FROM Fittings_1";
$result2 = mysql_query($query2)
or die("Info on your zipcode not found");
$nrow2 = mysql_num_rows($result2);
if ($nrow2 == '0')
{
include ("./php_includes/no_item_table.inc");
}
else
{
for ($i=0;$i<$nrow2;$i++)
{
$row2 = mysql_fetch_array($result2);
extract ($row2);
include("./php_includes/no_ship_item_table.inc");
}
}
//fittings 1.66"---------------------------------------------
include ("./php_includes/seperator.inc");
echo "<tr>
<td style='border-style:none; border-width:medium; ' colspan='3'>
<b><font size='4' face='Arial' color='#969493'><A NAME='Fitting16'>Handrail Pipe Fittings 1.660' (IPS 1-1/4' )
</font></b>
<font size='2' face='Arial' color='#969493'>
<a href='#Catalog' style='text-decoration: none'><font color='#969493'>
Back To Top</font></b></td>
</tr>";
$query3 = "SELECT * FROM Fittings_166";
$result3 = mysql_query($query3)
or die("Info on your zipcode not found");
$nrow3 = mysql_num_rows($result3);
if ($nrow3 == '0')
{
include ("./php_includes/no_item_table.inc");
}
else
{
for ($i=0;$i<$nrow3;$i++)
{
$row = mysql_fetch_array($result3);
extract ($row3);
include("./php_includes/no_ship_item_table.inc");
}
}[/PHP]
no_ship_item_table.inc:
[PHP]<?
echo "<tr>
<td width='120' style='border-style:none; border-width:medium; '>
<img border='0' src='$Picture'>
</td>
<td style='border-style:none; border-width:medium; ' valign='top'>
<font face='Arial' size='2'>$Name<br>
<font color='#800000'>Item# $Item_num
</font><br>
Shipping Cost is NOT included. Shipped through UPS.<br>
<a onClick=\"window.open('./description/$item_num.html', 'newwindow', 'height=720,width=520,toolbar=no,menubar=no,scroolbar=no,resizable=no,location=no,directories=no,status=no'); return false;\" style=\"text-decoration: none\" href=\"http://www.eezs.com\">
<font color='#800000'>Item Description Click Here</font></a></font></td>
<td style='border-style:none; border-width:medium; ' valign='top' width='150'>
<form action=Srry Cant reaveal' method='post'>
<p>
<font color='#800000' face='Arial' size='2'>Price: $ $Price
<br>
</font>
<font face='Arial'>
<input type='submit' value='Order Now'></font></p>
</form>
</td>
</tr>";
?>[/PHP]
also you can go to eezs.com/test to see where ther problem is and info there is incorrent in data wise
Problem exist on the web at where the catagory Handrail Pipe Fittings 1.315' ( IPS 1' ) and Handrail Pipe Fittings 1.660' (IPS 1-1/4' ) is...
First thing is that i am new to php and i could get stuck on one semicolen.
OK here is the code that i have problem with and the problem is that results given to both the query are same for some reason and i cant figure it out and i will also post the include file:
PHP
[PHP]//fittings 1"--------------------------------------------
include ("./php_includes/seperator.inc");
echo "<tr>
<td style='border-style:none; border-width:medium; ' colspan='3'>
<b><font size='4' face='Arial' color='#969493'><A NAME='Fitting1'>Handrail Pipe Fittings 1.315' ( IPS 1' )
</font></b>
<font size='2' face='Arial' color='#969493'>
<a href='#Catalog' style='text-decoration: none'><font color='#969493'>
Back To Top</font></a></font></b></td>
</tr>";
$query2 = "SELECT * FROM Fittings_1";
$result2 = mysql_query($query2)
or die("Info on your zipcode not found");
$nrow2 = mysql_num_rows($result2);
if ($nrow2 == '0')
{
include ("./php_includes/no_item_table.inc");
}
else
{
for ($i=0;$i<$nrow2;$i++)
{
$row2 = mysql_fetch_array($result2);
extract ($row2);
include("./php_includes/no_ship_item_table.inc");
}
}
//fittings 1.66"---------------------------------------------
include ("./php_includes/seperator.inc");
echo "<tr>
<td style='border-style:none; border-width:medium; ' colspan='3'>
<b><font size='4' face='Arial' color='#969493'><A NAME='Fitting16'>Handrail Pipe Fittings 1.660' (IPS 1-1/4' )
</font></b>
<font size='2' face='Arial' color='#969493'>
<a href='#Catalog' style='text-decoration: none'><font color='#969493'>
Back To Top</font></b></td>
</tr>";
$query3 = "SELECT * FROM Fittings_166";
$result3 = mysql_query($query3)
or die("Info on your zipcode not found");
$nrow3 = mysql_num_rows($result3);
if ($nrow3 == '0')
{
include ("./php_includes/no_item_table.inc");
}
else
{
for ($i=0;$i<$nrow3;$i++)
{
$row = mysql_fetch_array($result3);
extract ($row3);
include("./php_includes/no_ship_item_table.inc");
}
}[/PHP]
no_ship_item_table.inc:
[PHP]<?
echo "<tr>
<td width='120' style='border-style:none; border-width:medium; '>
<img border='0' src='$Picture'>
</td>
<td style='border-style:none; border-width:medium; ' valign='top'>
<font face='Arial' size='2'>$Name<br>
<font color='#800000'>Item# $Item_num
</font><br>
Shipping Cost is NOT included. Shipped through UPS.<br>
<a onClick=\"window.open('./description/$item_num.html', 'newwindow', 'height=720,width=520,toolbar=no,menubar=no,scroolbar=no,resizable=no,location=no,directories=no,status=no'); return false;\" style=\"text-decoration: none\" href=\"http://www.eezs.com\">
<font color='#800000'>Item Description Click Here</font></a></font></td>
<td style='border-style:none; border-width:medium; ' valign='top' width='150'>
<form action=Srry Cant reaveal' method='post'>
<p>
<font color='#800000' face='Arial' size='2'>Price: $ $Price
<br>
</font>
<font face='Arial'>
<input type='submit' value='Order Now'></font></p>
</form>
</td>
</tr>";
?>[/PHP]
also you can go to eezs.com/test to see where ther problem is and info there is incorrent in data wise
Problem exist on the web at where the catagory Handrail Pipe Fittings 1.315' ( IPS 1' ) and Handrail Pipe Fittings 1.660' (IPS 1-1/4' ) is...
Are you sure it is returning a result? I don't think an empty result will cause it to die. So what I mean is that for some reason there is no result for either query, therefore they are the same result...
Dance
Dance
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Apache (Linux Servers and Apache)
- Double Dropdown Submit ,PHP ,MYSQL (PHP)
- PHP/Mysql Flash problem !!!!1 (PHP)
- php mysql problem (PHP)
- PHP-MySQL Conn Problem in Win XP (PHP)
- installing php and mysql properly (Windows Servers and IIS)
- php mysql help (PHP)
- Using PHP, MySQL and Apache Server (PHP)
Other Threads in the PHP Forum
- Previous Thread: Send mail on MYSQL connection failure
- Next Thread: php flash mail


Linear Mode