By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,636 Members | 1,814 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,636 IT Pros & Developers. It's quick & easy.

unexpected T_STRING in D:\intranet\include\qaDatabaseLib.php on line 44

P: n/a
Hello,
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbTable,$SQLstat)
// END OF LINE 44
{

global $dataRow, $db, $SQLstat, $Result;

if (!($db = odbc_connect('$SQLstat','sa','')))
{
//Connection Error Check
print '<span class="error"> Could not establish connection to
$db.</span>';
exit;
}//end if

// Result error check
if (!($Result = odbc_exec($db,$SQLstat)))
{
//exit if there are errors when executing SQL
print "####<BR>";
print "Query Used: <BR>";
print $SQLstat;
print ("<BR>");
print "####<BR>";
print ("Could not execute query: ");
$errorMsg = odbc_errormessage($db);
print ("'<span class=\"error\"> $errorMsg </span>'");
exit;

}//end if
}

$dataRow = odbc_fetch_array($Result);

}
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Paul wrote:
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbTable,$SQLstat)

___^^___

did you mean function? or was this a copying error?
Anyway, if the error generated somewhere else than line 44 that was
*before* this line. Show the code from the start to line 44 instead (no
use for us to look for errors in line 44 forwards)
--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :
Jul 17 '05 #2

P: n/a

On 31-Mar-2004, pa**@sysxperts.com (Paul) wrote:
Thanks in advance for your help, I have 3 pages generating the same
exact error on the same section of each page and I can't see the
problem - hoping a second set of eyes can help. I verified all
closing braces etc. and can't understand why the line in question is
generating a T_STRING error
Here is the code:
//-----------------------------------------------------
//THIS IS LINE 44
fuction dbConnect($aDbTable,$SQLstat)
// END OF LINE 44
{

global $dataRow, $db, $SQLstat, $Result;

if (!($db = odbc_connect('$SQLstat','sa','')))
{
//Connection Error Check
print '<span class="error"> Could not establish connection to
$db.</span>';
exit;
}//end if

// Result error check
if (!($Result = odbc_exec($db,$SQLstat)))
{
//exit if there are errors when executing SQL
print "####<BR>";
print "Query Used: <BR>";
print $SQLstat;
print ("<BR>");
print "####<BR>";
print ("Could not execute query: ");
$errorMsg = odbc_errormessage($db);
print ("'<span class=\"error\"> $errorMsg </span>'");
exit;

}//end if
}

$dataRow = odbc_fetch_array($Result);

}


You spelled function wrong.
--
Tom Thackrey
www.creative-light.com
tom (at) creative (dash) light (dot) com
do NOT send email to ja*********@willglen.net (it's reserved for spammers)
Jul 17 '05 #3

P: n/a
DOH!! Thanks guys, that was staring me right in the face and i missed
it - always good to have more eyes around - so used to having this
error from a missing " ; or { or something that i wasn't even thinking
to check for spelling errors.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.