MySQL Forums
Forum List  »  PHP

Re: Trouble with updating Mysql table data
Posted by: Lanze Langill
Date: March 22, 2012 05:59PM

Hey,

Sorry for the delay in replying, was commuting home after a long day at the office.

Here is an example of what I use for my DB connections and calls.

<code>function dbConnect($dbQuery){
//echo $dbQuery;
mysql_connect(DBURL,DBUSERNAME,DBPASSWORD);
@mysql_select_db(DATABASE) or die( "Unable to select database");
$dbConnectReturn = mysql_query($dbQuery);
return $dbConnectReturn;
}
$dbQuery = "What ever query statement you need... ";
$dbResult = dbConnect($dbQuery);
$numResults = mysql_num_rows($dbResult);</code>

Options: ReplyQuote


Subject
Written By
Posted
Re: Trouble with updating Mysql table data
March 22, 2012 05:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.