|
Posted by ft310 on 02/07/07 02:45
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.
Navigation:
[Reply to this message]
|