|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Only variable references should be returned by reference
Hi,
I got the PHP code from www.phpwebcommerce.com/php-mysql-shopping-cart-tutorial.php I recieve this message when i upload on the server how to solve the problem ----------------------------------------------------- Notice: Only variable references should be returned by reference in /home.2/asbeza/www/plaincart/library/database.php on line 9 Notice: Only variable references should be returned by reference in /home.2/asbeza/www/plaincart/library/database.php on line 25 ---------------------------------------------------- Here is the code ------------------------- <?php require_once '/home.2/asbeza/www/plaincart/library/config.php'; $dbConn = mysql_connect ($dbHost, $dbUser, $dbPass) or die ('MySQL connect failed. ' . mysql_error()); mysql_select_db($dbName) or die('Cannot select database. ' . mysql_error()); function &dbQuery($sql) { return mysql_query($sql); } function dbAffectedRows() { global $dbConn; return mysql_affected_rows($dbConn); } function &dbFetchArray($result, $resultType = MYSQL_NUM) { return mysql_fetch_array($result, $resultType); } function &dbFetchAssoc($result) { return mysql_fetch_assoc($result); } function &dbFetchRow($result) { return mysql_fetch_row($result); } function dbFreeResult($result) { return mysql_free_result($result); } function dbNumRows($result) { return mysql_num_rows($result); } function dbSelect($dbName) { return mysql_select_db($dbName); } function dbInsertId() { return mysql_insert_id(); } ?> |
|
#2
|
|||
|
|||
|
RE: Only variable references should be returned by reference
Quote:
|
|
#3
|
|||
|
|||
|
RE: Only variable references should be returned by reference
Have you managed to get an answer on this, got the same problem and just cannot work around it apart from canning the abstraction lauer and doing things the long way round....
|
|
#4
|
||||
|
||||
|
RE: Only variable references should be returned by reference
it is just saying it doesn't like returning the value from the function... you could always put it in a var and return that.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Only variable references should be returned by reference |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|