concatenate issue?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello and thank you for your time...
i have not been able to get the below to produce any results... i'm getting no mysql error messages... just "There are no stores that match your search. Please try another..."
no matter what i have tried it worketh not...
thank you again. best regards, addison
// url of site with problem: http://www.momandpopcentral.com - select a category(arts & crafts) and state(TN) -next page enter city(nashville) there is a test store there that will not appear.


//top of page:
<?
require("config.php");

$count = 0;

$scobj = mysql_db_query($dbname,"select * from subcategory where id=$id");
$scrow = mysql_fetch_object($scobj);
$cobj = mysql_db_query($dbname,"select * from category where id=$scrow->category");
$crow = mysql_fetch_object($cobj);


?>

//mid-page or so: working fine.
<p align="center"> <p><font face="Verdana" size="2"><b><font color="#CC6600"><br>
<? echo $crow->name; ?>
<font color="#CC6600">-> Select-A-Business</font></font></b></font> </p>


//where i need results and not getting any:
<?
$query = "select * from stores,subcategory,category where stores.category = $crow->id and subcategory.category = $crow->id and
(stores.city = '$city' and stores.state = '$state') and que='checked' order by 'name'";
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$count++;
?>
<tr>
<td valign=top wrap align="left" width="50%"> <font color="#CC6600" size="2" face="Verdana"><small>
<a href="<? echo $row->url; ?>" target="new"><b>
<? echo $row->name; ?>
</b></a><BR>
<? echo $row->shortdesc; ?>
</font></td>
<td valign=top wrap align="left" width="50%"> <font color="#CC6600" size="2" face="Verdana"><small>
<?
if ($row = mysql_fetch_object($obj))
{
?>
<a href="<? echo $row->url; ?>" target="new"><b>
<? echo $row->name; ?>
</b></a></font> <font color="#CC6600" size="2" face="Verdana"><small>
<?
echo $row->shortdesc;
} else {
echo "&nbsp;</font>";
}
?>
</font></td>
</tr>
<?
}
?>
</table>
<?
if ($count == 0)
{
?>
<CENTER>
<font face="Verdana" size="2" color="#00CCFF"><? echo $city; ?><br>
</font> <font face="Verdana" size="2" color="#FF0000">There are no stores
that match your search.<br>
Please try another...</font><BR>
</CENTER>
<?
}
?>


//i have checked my db and my admin area and that all works fine... i can't figure it out... thanks again...
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
addison@bellsouth.net
info@smipco.com
subsidiaries of small independent publishing co.
info@gloabaldog.com
info@momandpocentral.com
addisonellis.com


THIS E-MAIL AND ANY FILES TRANSMITTED WITH IT ARE CONFIDENTIAL AND ARE INTENDED SOLELY FOR THE INDIVIDUAL OR ENTITY TO WHOM THEY ARE ADDRESSED. IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO NOT READ, COPY OR RE-TRANSMIT THIS COMMUNICATION BUT DESTROY IT IMMEDIATELY. ANY UNAUTHORIZED DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS STRICTLY PROHIBITED.
A

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux