•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 392,063 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,225 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 2075 | Replies: 2
![]() |
•
•
Join Date: Jul 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
Iam a MySQL user and Iam currently having some error messages in my code.I use TYPO3 as the frontend.
I get these 2 warning messages
Warning: Supplied argument is not a valid MySQL result resource in /var/www/typo3/lib/t3lib/class.t3lib_db.php on line 677
Warning: Cannot add header information - headers already sent by (output started at /var/www/typo3/lib/t3lib/class.t3lib_db.php:677) in /var/www/typo3/lib/typo3/template.php on line 596
And the code in the 2 files r like this
[PHP]/**
* Returns the number of selected rows.
* mysql_num_rows() wrapper function
* Usage count/core: 85
*
* @param pointer MySQL result pointer (of SELECT query) / DBAL object
* @return integer Number of resulting rows.
*/
function sql_num_rows($res) {
return mysql_num_rows($res);
}[/PHP]
and for the secon warning its like this
[PHP] function startPage($title) {
// Get META tag containing the currently selected charset for backend output. The function sets $this->charSet.
$charSet = $this->initCharset();
$generator = $this->generator();
// For debugging: If this outputs "QuirksMode"/"BackCompat" (IE) the browser runs in quirks-mode. Otherwise the value is "CSS1Compat"
// $this->JScodeArray[]='alert(document.compatMode);';
// Send HTTP header for selected charset. Added by Robert Lemke 23.10.2003
header ('Content-Type:text/html;charset='.$this->charset);
switch($this->docType) {
case 'xhtml_strict':
$headerStart= '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="'.$this->charset.'"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
';
break;
case 'xhtml_trans':
$headerStart= '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml version="1.0" encoding="'.$this->charset.'"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
';
break;
case 'xhtml_frames':
$headerStart= '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<?xml version="1.0" encoding="'.$this->charset.'"?>
';
break;
default:
$headerStart='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
break;
}
// Construct page header.
$str = $headerStart.'[/PHP]
the main code that iam using is a real big one and also the problem is this is a live server running and so i cant give the full code.
Can you please help me with this.
I tried a lot of stuffs like checking for any blank spaces which might be put in by the editor, and for case sensitiveness but i dont seem to find any of those.Is there any other way to solve this problem.Please help me.
Thank you.
Iam a MySQL user and Iam currently having some error messages in my code.I use TYPO3 as the frontend.
I get these 2 warning messages
Warning: Supplied argument is not a valid MySQL result resource in /var/www/typo3/lib/t3lib/class.t3lib_db.php on line 677
Warning: Cannot add header information - headers already sent by (output started at /var/www/typo3/lib/t3lib/class.t3lib_db.php:677) in /var/www/typo3/lib/typo3/template.php on line 596
And the code in the 2 files r like this
[PHP]/**
* Returns the number of selected rows.
* mysql_num_rows() wrapper function
* Usage count/core: 85
*
* @param pointer MySQL result pointer (of SELECT query) / DBAL object
* @return integer Number of resulting rows.
*/
function sql_num_rows($res) {
return mysql_num_rows($res);
}[/PHP]
and for the secon warning its like this
[PHP] function startPage($title) {
// Get META tag containing the currently selected charset for backend output. The function sets $this->charSet.
$charSet = $this->initCharset();
$generator = $this->generator();
// For debugging: If this outputs "QuirksMode"/"BackCompat" (IE) the browser runs in quirks-mode. Otherwise the value is "CSS1Compat"
// $this->JScodeArray[]='alert(document.compatMode);';
// Send HTTP header for selected charset. Added by Robert Lemke 23.10.2003
header ('Content-Type:text/html;charset='.$this->charset);
switch($this->docType) {
case 'xhtml_strict':
$headerStart= '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="'.$this->charset.'"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
';
break;
case 'xhtml_trans':
$headerStart= '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?xml version="1.0" encoding="'.$this->charset.'"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
';
break;
case 'xhtml_frames':
$headerStart= '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<?xml version="1.0" encoding="'.$this->charset.'"?>
';
break;
default:
$headerStart='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">';
break;
}
// Construct page header.
$str = $headerStart.'[/PHP]
the main code that iam using is a real big one and also the problem is this is a live server running and so i cant give the full code.
Can you please help me with this.
I tried a lot of stuffs like checking for any blank spaces which might be put in by the editor, and for case sensitiveness but i dont seem to find any of those.Is there any other way to solve this problem.Please help me.
Thank you.
•
•
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 344
Reputation:
Rep Power: 4
Solved Threads: 4
Do not worry about the second error. The first error is causing the second. Fix the first, and the second goes away.
"Warning: Supplied argument is not a valid MySQL result" is exactly that--an invalid MySQL result. This is usually because the query you executed was invalid. So find the code where the SQL statement is actually executed (mysql_query()) and echo out the sql statement so you can physically see what is being sent to the database. Most likely, you'll find your problem.
"Warning: Supplied argument is not a valid MySQL result" is exactly that--an invalid MySQL result. This is usually because the query you executed was invalid. So find the code where the SQL statement is actually executed (mysql_query()) and echo out the sql statement so you can physically see what is being sent to the database. Most likely, you'll find your problem.
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi IM not sure if you still have the error in TYPO3 to rectify the error you will need to IMPORT the database, go to the backend and click on "Install", then goto database analyser, next to "Update required tables" click on compare and start updating the tables.
THen click on IMPORT next to Dump static data and import the records,
and that should hopefully have fixed your problem.
Tell me if that has rectified the problem?
Thanks
Ali
THen click on IMPORT next to Dump static data and import the records,
and that should hopefully have fixed your problem.
Tell me if that has rectified the problem?
Thanks
Ali
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
Similar Threads
- Error messages on startup XP (Windows NT / 2000 / XP / 2003)
- Error messages aplenty!!!!! (C++)
- Microsoft Error Messages (Techies' Lounge)
- Wierd error messages with calculator program (C++)
- program w/ switch AND nested if. six error messages (C++)
- internet explorer error messages (Web Browsers)
Other Threads in the MySQL Forum
- Previous Thread: MySQL varchar limitation
- Next Thread: Converting Excel to Mysql


Linear Mode