PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
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  
Old December 18th, 2005, 05:06 PM
Dureyewe Dureyewe is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Addis Abeba,Ethiopia
Posts: 2 Dureyewe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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();
}
?>

Reply With Quote
  #2  
Old December 18th, 2005, 05:08 PM
Dureyewe Dureyewe is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Addis Abeba,Ethiopia
Posts: 2 Dureyewe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Only variable references should be returned by reference


Quote:
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();
}
?>


Reply With Quote
  #3  
Old February 2nd, 2006, 06:22 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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....

Reply With Quote
  #4  
Old February 2nd, 2006, 10:25 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,721 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 26 m 5 sec
Reputation Power: 6
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.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Only variable references should be returned by reference


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway