Jump to content

AAC-Bob

New Members
  • Posts

    4
  • Joined

  • Last visited

AAC-Bob's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Ch0cu3r, I went to the link and resolved the problem. Thank you. OK now one more I can't seam to solve; original; while($row2 = mysql_fetch_array($results2)) tried; while($row2 = $result2->fetch_array()) error: Warning: mysql_fetch_array() expects parameter 1 to be resource, null given Bob
  2.     OK I removed it and error gone, TNX,
  3. I use the include ("mySqli_conn.php"); for all my php database mysqli connections. I have 4 other pages using this common file that work just fine. If this is the problem then I am confused. Bob
  4. I am attempting to change some php code to mysqli. I'm not a skilled programmer and am running into some query problems. Here is the Existing code; Here is the Existing code; <?php $link = mysql_connect($config['DB_Host'], $config['DB_User'], $config['DB_Passwd']) or die('Cannot connect to the database'); mysql_select_db($config['DB_Name'],$link) or die('Cannot select the database'); parse_str(str_replace(':', '&', $_COOKIE['UserSettings']),$userInfo); $MemberID = $userInfo["MemberID"]; $query = "SELECT PersonID FROM `membershipperson` where MembershipID = ".$MemberID; $result = mysql_query($query) or die ("Errant Query: ".$query); $record = mysql_fetch_array($result); $personID = $record["PersonID"]; # additional code below ?> New Code <?php include ("mySqli_conn.php"); $result = $link->query($sql)or die('Cannot select the database'); parse_str(str_replace(':', '&', $_COOKIE['UserSettings']),$userInfo); $MemberID = $userInfo["MemberID"]; $sql = "SELECT PersonID FROM `membershipperson` where MembershipID = ".$MemberID; $result = $link->query($sql)or die ("Errant Query: ".$query); $result->fetch_array($result); $personID = $record["PersonID"]; ?> Error Warning: mysqli::query() [mysqli.query]: Empty query in /~/position.php on line 6 Cannot select the database Thanks, Bob C
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.