here is the problem
require ('config.inc.php');
$uconn = mysql_connect($dbserver,$usname,$passw) or die("Could not connect to the database");
mysql_select_db($db) or die("Could not select the database $db");
//I am returning the strait query value, so I dont want to mess with that.
$result = mysql_query($sql,$uconn);
return $result;
mysql_close($uconn);
Because I am returning the raw query result so I can do what ever I need to with it. for example in one spot I use it to make a array, in a nother I will just dump it to the client. so I just cant figure how to send the affacted rows outside the function.
I am calling it like this
$result = user_sql($sql,$db,$usname,$passw);