I once did a course on PHP and I'm now trying to get back into the
language.
I'm looking at some of the SMF scripts and am getting stuck very early
on in figuring out things.
In the code, I see (for instance):
$request = db_query("
SELECT passwd, ID_MEMBER, ID_GROUP, lngfile, is_activated,
emailAddress, additionalGroup s, memberName, passwordSalt
FROM {$db_prefix}mem bers
WHERE memberName = '$_REQUEST[user]'
LIMIT 1", __FILE__, __LINE__);
What I can't figure out (after having searched both the php.net site
and the MySQL site if the
db_query is a user-written function or part of the built-in MySQL
functions?
I've looked in the code and couldn't find where such a function might
be defined. If it is not in the actual module I'm looking at, it must
be included with an include or some other method?
I strongly suspect that the db_query function is specific to the SMF
scripts, since it is passing the file name and line number so I
suspect that the db-query function can issue a good diagnostic message
with traceback to the calling code. But I can't figure out where they
have hidden the function.
language.
I'm looking at some of the SMF scripts and am getting stuck very early
on in figuring out things.
In the code, I see (for instance):
$request = db_query("
SELECT passwd, ID_MEMBER, ID_GROUP, lngfile, is_activated,
emailAddress, additionalGroup s, memberName, passwordSalt
FROM {$db_prefix}mem bers
WHERE memberName = '$_REQUEST[user]'
LIMIT 1", __FILE__, __LINE__);
What I can't figure out (after having searched both the php.net site
and the MySQL site if the
db_query is a user-written function or part of the built-in MySQL
functions?
I've looked in the code and couldn't find where such a function might
be defined. If it is not in the actual module I'm looking at, it must
be included with an include or some other method?
I strongly suspect that the db_query function is specific to the SMF
scripts, since it is passing the file name and line number so I
suspect that the db-query function can issue a good diagnostic message
with traceback to the calling code. But I can't figure out where they
have hidden the function.
Comment