Re: hello

Andrei Smirnov <[email protected]> Sat, 9 Jul 2005 01:00:17 -0400 (EDT)
Newsgroups gmane.org.user-groups.linux.morlug
Message-ID <[email protected]>
A quick reply would be:

Make a copy of your file.
Keep deleting stuff from the file untill the eroor dissapears

On Wed, 6 Jul 2005, gayathri suriyanarayanan wrote:

> Hello,
> Iam a MySQl user and the frontend that I use is TYPO3.
> I have got 2 warning messages in that and they are
> 
> 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 related code for the first error is 
> /**
> 	 * 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);
> 	}

I am a bit suspecious about using $res here without specifying what it is.
In my script I usually use something like this:

$res = mysql_query($query);
$n = mysql_numrows($res);

I'm not sure about the rest.

Andrei

> 
> 
> And the related code for the second one is 
> 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);
> 
> 
> And in my main file in PHP I have a few lines abt this
> mysql_num_rows($res) function.
> I tried to change a lot of things but even then I keep
> getting the same error messages over and over again.
> Can you please help me in how to fix this problem.
> Thank You.
> 
> 
> 
> 		
> ____________________________________________________
> Sell on Yahoo! Auctions – no fees. Bid on great items.  
> http://auctions.yahoo.com/
> _______________________________________________
> Morlug mailing list
> [email protected]
> http://mailman.morlug.org/mailman/listinfo/morlug
> 

-- 
---------------------------------------------
Dr. Andrei Smirnov,  West Virginia University
Dept. of Mechanical and Aerospace Engineering
Morgantown WV, 26506-6106
Tel:+1(304)293 3111 x2345, fax:+1(304)2936689
Email: [email protected]
http://smirnov.mae.wvu.edu     1024D/5CEDD3E2
---------------------------------------------