Snitz
10-31-2008, 07:40 AM
mysql help
I have a set of mysql lines that fetches data from a table, here's the code.
PHP Code:
$sql = "select テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t1.*,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t2.Name as estate_type,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t3.Name as estate_status,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t4.Name as estate_township,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t5.Name as estate_roomtype,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t6.Currency as estate_rent_currency,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t7.Images as estate_images,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t8.Name as estate_cityテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t9.Name as Locationテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*from t_advert t1テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t2 on t2.PageType='EstateType'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t3 on t3.PageType='EstateStatus'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t4 on t4.PageType='TownShip'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t5 on t5.PageType='RoomType'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_exchange t6 on t6.Currency=t1.RentCurrencyテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_advert_images t7 on t7.ParentID=t1.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t8 on t8.PageType='City'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t9 on t9.PageType='Location'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*where テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t2.ItemIDテつ*テつ*テつ*= t1.EstateType and t2.PageLang='".$_SESSION['Lang']."' and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t3.ItemIDテつ*テつ*テつ*= t1.EstateStatus and t3.PageLang='".$_SESSION['Lang']."' and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t4.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*= t1.TownShipID andテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t5.ItemIDテつ*テつ*テつ*= t1.RoomType and t5.PageLang='".$_SESSION['Lang']."' and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t6.Currency = t1.RentCurrency and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t7.ParentID = t1.ID and t7.Seq = (select min(Seq) from t_advert_images where Visible='1' and ParentID=t1.ID group by Seq LIMIT 0,1) and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t8.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*= t1.CityID andテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t9.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*= t1.Location andテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t1.Visible='1' and t1.PrivateAdvert='1' order by t1.RentPrice ascテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*";$qrPrivateAdvert = mysql_query($sql); while($rsPrivateAdvert = mysql_fetch_array($qrPrivateAdvert)) {
What I did was add the "t9.Name as Location" which is an existing field in the table and that method is working fine on other pages, I just don't know what I'm doing wrong in here. This code is not functioning at all, can anyone help me please.
Thanks,
George
__________________http://drugart.deviantart.com
I have a set of mysql lines that fetches data from a table, here's the code.
PHP Code:
$sql = "select テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t1.*,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t2.Name as estate_type,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t3.Name as estate_status,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t4.Name as estate_township,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t5.Name as estate_roomtype,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t6.Currency as estate_rent_currency,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t7.Images as estate_images,テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t8.Name as estate_cityテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t9.Name as Locationテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*from t_advert t1テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t2 on t2.PageType='EstateType'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t3 on t3.PageType='EstateStatus'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t4 on t4.PageType='TownShip'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t5 on t5.PageType='RoomType'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_exchange t6 on t6.Currency=t1.RentCurrencyテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_advert_images t7 on t7.ParentID=t1.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t8 on t8.PageType='City'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*inner join t_properties t9 on t9.PageType='Location'テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*where テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t2.ItemIDテつ*テつ*テつ*= t1.EstateType and t2.PageLang='".$_SESSION['Lang']."' and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t3.ItemIDテつ*テつ*テつ*= t1.EstateStatus and t3.PageLang='".$_SESSION['Lang']."' and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t4.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*= t1.TownShipID andテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t5.ItemIDテつ*テつ*テつ*= t1.RoomType and t5.PageLang='".$_SESSION['Lang']."' and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t6.Currency = t1.RentCurrency and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t7.ParentID = t1.ID and t7.Seq = (select min(Seq) from t_advert_images where Visible='1' and ParentID=t1.ID group by Seq LIMIT 0,1) and テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t8.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*= t1.CityID andテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t9.IDテつ*テつ*テつ*テつ*テつ*テつ*テつ*= t1.Location andテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*t1.Visible='1' and t1.PrivateAdvert='1' order by t1.RentPrice ascテつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*テつ*";$qrPrivateAdvert = mysql_query($sql); while($rsPrivateAdvert = mysql_fetch_array($qrPrivateAdvert)) {
What I did was add the "t9.Name as Location" which is an existing field in the table and that method is working fine on other pages, I just don't know what I'm doing wrong in here. This code is not functioning at all, can anyone help me please.
Thanks,
George
__________________http://drugart.deviantart.com
