mysql-php error message
<pre><code>//connecting to the remot database ends
//connecting to the local database
            do
        {
           array_push($msgs2,$msgs['Message']);
        }
        while($msgs=mysql_fetch_assoc($rs));

        $con=mysql_pconnect($todb,'
               die("couldn't connect");
        }

           mysql_select_db("dtestfor_IPAB_db",$con);//databasename

           foreach($msgs2 as $m)
        {
            $m2 = explode(",",$m);

        }
//connecting to the local database ends
//connecting to the remot database  
            $dblink2 = mysql_pconnect); // connect server 2

             // select database 2

        $rs4=mysql_query("select max(sms_index) as 'ma' from ".$smstable."");
        $max2=mysql_fetch_assoc($rs4); 
//connecting to the remot database ends
//connecting to the local database
            $con=mysql_pconnect($todb,);//servername,username,password
                if(!$con)
        {
               die("couldn't connect");
        }

            mysql_select_db($con);

        mysql_query(']);
 //connecting to the local database ends
 ?&gt;
</code></pre>

<p>Hi all....i am trying to get the values from sms table which is on one server and insert those values into another table in another server. while doing that i'm using another table that will check the max value in sms table accordingly it will insert the values.
all the code seems fine but when i execute the code i'm getting the error message as 
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource on (url) in line no 37,45,67.
i think the wrong is there with the syntax.
any help will be much appreciated.....thanks in advance...</p>
