Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286

2003-06-09 Thread Marcelo Luiz de Laia
Hi Thomas and All,

 why are you using sql_query through your code?
 its
 mysql_query for mysql!


I use phpnuke and it have a sql_layer.php. You are correct, for mysql is
mysql_query. But this dont is the problem, I change it and the problem
continue!

Any tip??

Thanks

Marcelo

- Original Message - 
From: Thomas Seifert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 08, 2003 6:50 PM
Subject: Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a
valid MySQL result resource in f:\.\none.php on line 286


 why are you using sql_query through your code?
 its
 mysql_query for mysql!
 and the result, needed for mysql_fetch_row is returned from that function.
 read the docs again.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286

2003-06-09 Thread Marcelo Luiz de Laia
Hi Janet,

I dont have know how in php.

I inserted the function mysql_error() in my code and it dont return any
message!

Thanks

Marcelo

 This means that when you did:

 $result = mysql_query($sql);

 $result did not end up with a valid resource in it. Then, when you do the
fetch row command using $result, it fails with this message. In general, the
reason in that  there is something wrong with the query so it either fails
or doesn't return any results. You can use mysql_error() to find out what
went wrong if it failed.

 Janet


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286

2003-06-09 Thread Marcelo Luiz de Laia
Hi Philip and Thomas and All.

Thanks very much for yours helps.

I am Brazillian and I speak in portuguese, for this, I am sorry very much
for my bad english.

After a long time, my code works very good! But, I dont understand what was
the problem!

My code was:

$result = sql_query(select categoria, nombre, datafim from
.$prefix._anuncios order by datafim limit 0,30, $dbi);
while (list($categoria, $nombre) = sql_fetch_row($result, $dbi)) {
$content .= img src=blocks/images/diamond.gifnbsp;a
href=\modules.php?name=Concurso\font color=\#096C88\b$categoria
/b $nombre/anbsp;;
}

and dont works.

If I change it for:

//$result = sql_query(select categoria, nombre, datafim from
.$prefix._anuncios order by datafim limit 0,30, $dbi);
$sql = select categoria, nombre, datafim from .$prefix._anuncios order by
datafim limit 0,30;
while (list($categoria, $nombre) = sql_fetch_row($result, $dbi)) {
$content .= img src=blocks/images/diamond.gifnbsp;a
href=\modules.php?name=Concurso\font color=\#096C88\b$categoria
/b $nombre/anbsp;;
}

It works very good!

My question:

In while instruction have a $result and $dbi. They dont are necessary in the
sql_query? Understand me?

Marcelo


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286

2003-06-08 Thread Marcelo Luiz de Laia
What this message means?

What it is the error?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in f:\.\none.php on line 286


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286

2003-06-08 Thread Marcelo Luiz de Laia
What this message means?

What it is the error?

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
resource in f:\.\none.php on line 42

This is the code.

Thanks very much.

Marcelo


?php

if (eregi(block-Concurso.php, $PHP_SELF)) {
Header(Location: index.php);
die();
}

$usemarquee = 1;
$scrolldirection = left;

global $prefix, $multilingual, $currentlang, $dbi;

$sql = DELETE FROM .$prefix._anuncios WHERE datafimNOW();
sql_query($sql, $dbi);

if ($multilingual == 1) {
$querylang = WHERE (alanguage='$currentlang' OR alanguage='');
} else {
$querylang = ;
}
$result = SELECT categoria, nombre, datafim FROM .$prefix._anuncios ORDER
BY datafim LIMIT 0,30;
sql_query($result, $dbi);
$content = table  width=\100%\ border=\0\;
$content .=center STYLE=\text-decoration: none\font
color=\#66\bÚltimos 10 Concursos/b/center;
$content .= Marquee Behavior=\Scroll\ Direction=\$scrolldirection\
$width=\100%\ ScrollAmount=\3\ ScrollDelay=\90\
onMouseOver=\this.stop()\ onMouseOut=\this.start()\;

\\ line 42
while (list($categoria, $nombre, $datafim, $counter) =
mysql_fetch_row($result, $dbi)) {

$content .= img src=blocks/images/diamond.gifnbsp;a
href=\modules.php?name=Concurso\font color=\#096C88\b$categoria
br $nombre/b/anbsp;;

}

$content .= /table;

?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php