You are here: Re: PHP Mysql Outputting Records Repeatedly. « All PHP « IT news, forums, messages
Re: PHP Mysql Outputting Records Repeatedly.

Posted by Ramon Rabaso on 09/30/56 12:00

cgkh.webservices wrote:
> Would be grateful for any help.
>
> I have not messed with php/mysql in a while and have come up with a
> problem I have run up against before but cannot remember the solution.
>
> <?php
>
> require_once('xxxxxx.php');
>
> $prop_sel_1 = "SELECT
> CASAS.area_id,CASAS.casa_id,CASAS.casa_nom,CASAS.quartos,CASAS.pessoas,CASAS.preco_natal,CASAS.preco_jan,CASAS.preco_fev,CASAS.preco_mar,CASAS.preco_abr,CASAS.preco_mai,CASAS.
> preco_jun,CASAS.preco_jul,CASAS.preco_ago,CASAS.preco_set,CASAS.preco_out,CASAS.preco_nov,CASAS.preco_dez,CASAS.preco_pascoa,CASAS.casa_text_pt,CASAS.form_url_pt,CASAS.cas_img_ref_1,CASAS.active,CASAS.hotel,TOWNS.area_id,TOWNS.name,TOWNS.text_pt,TOWNS.text_2_pt,TOWNS.img_ref_2
> FROM CASAS,TOWNS WHERE CASAS.hotel='Yes' LIMIT 0, 8";

Hi,

PhP and MySQL/SQL are not my tongue languages but I think I can help you
on this.

Try changing your WHERE clausule in your query to:
....WHERE CASAS.hotel='Yes' and CASAS.area_id = TOWNS.area_id LIMIT 0,8";

Of course I didn't test it, but I bet it helps.

Good luck!

Ramon Rabaso
http://www.realtimequery.com - Live Help for Websites.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация