i'm a complete beginner with PHP, and worse all of the reference material i have (2 big books + this internet thingy) are for PHP4. where i work we run PHP3 on our server, supposedly there are some incompatabilities with some of our code to update, too many bugs.
but my real naive question is, in some of our code, there are lines like this:
$plusdate=mysql_result($result,$a,plusDates);
now, the first part says 'plusdate', the second part says 'plustDates' - note the 's' to pluralize the second call. is there such a THING as 'plusDates' in any version of php3? we're having some bugs with this plusDate function and i'm trying to figure out if it's merely a spelling error! or if the problem goes deeper.
i've tried changing the pluralized 's' on one page, and it generates mySQL errors; however if the call is made across several pages, and spelled wrong on several pages, could this also be part of the problem? any insight?
thanks
nick
plusDate function
Moderator: General Moderators
-
nicknormal
- Forum Newbie
- Posts: 1
- Joined: Thu Nov 03, 2005 3:50 pm
- Location: NYC
- Contact:
http://www.php.net/mysql_result.
So i suggest that you first test if plusDates is somewhere defined as a constant.The name or offset of the field being retrieved.
It can be the field's offset, the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. If undefined, the first field is retrieved.
Code: Select all
if (defined('plusDates'))
{
echo "plusDates is a constant and has the value: " . plusDates;
}
else
{
echo "plusDates is not a constant and has the value: " . plusDates;
}