You are here: Re: multiple database queries « PHP Language « IT news, forums, messages
Re: multiple database queries

Posted by ft310 on 02/07/07 04:38

"ft310" <ft310@yahoo.com> wrote in message
news:l2byh.123$T25.200@eagle.america.net...
> I have a web page that is making two seperate queries against the same
> database. Each query is ina seperate javascript function which uses php to
> access the database. Each of the two functions work when they are alone in
> the webpage. When both are physically in the same webpage, neither of them
> works.
>
> The first function is:
> function TownTalk(searchFilter)
> {
> //
> // searchfilter can contain 'All' OR 'County, State'
> //
> if (searchFilter == 'All')
> {
> var filter01 = 'All' ;
> var filter02 = '' ;
> <?php
> $db = mysql_connect('xxxxxxxxxx', 'xxxxx', 'xxxxxxxxx') ;
> mysql_select_db('rhodeisl_ft310',$db) ;
> $resultT = mysql_query('SELECT LocationsGB.Town, LocationsGB.Area,
> LocationsGB.State, LocationsGB.County FROM LocationsGB INNER JOIN
> MeetingsNewGB ON LocationsGB.LocationIndex = MeetingsNewGB.LocationIndex
> GROUP BY LocationsGB.Town, LocationsGB.Area, LocationsGB.State,
> LocationsGB.County ORDER BY LocationsGB.Town, LocationsGB.Area,
> LocationsGB.State DESC',$db) ;
> if ($myrowT=mysql_fetch_array($resultT))
>
> This function ends with a mysql_close($db) ;
>
> The second function is
> function CodeTalk()
> {
> <?php
> $dcb = mysql_connect('205.178.146.19', 'ft310', '43rlc#67db') ;
> mysql_select_db('rhodeisl_ft310',$dcb) ;
> $resultCode = mysql_query('SELECT MeetingCodeGB.MeetingCode AS Code,
> MeetingCodeGB.MeetingDescription AS Description FROM MeetingCodeGB ORDER
BY
> MeetingCodeGB.MeetingCode',$dcb) ;
> if ($myrowCode=mysql_fetch_array($resultCode))
>
>
> I am wondering if the reason these two functions do not work when they are
> in the same web page is because of some error of mine in the php coding --
> like maybe it is not permitted to do what I am doing or I should be doing
> this another way or etc.
>
> In advance thank you for your assistance.
>


Thank you for your assistance.

Pardon my gaff at exposing the password -- it is for AA meetings in Rhode
Island -- its not that important to most folks

And we keep the back up off the internet so its not that hard to fix.

What I am getting here is that the problem is not in the PHP / MySQL side of
the coding -- is that correct?

 

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

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