FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Warning admdump.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Warning admdump.php [message #13532] Thu, 16 October 2003 16:49 Go to next message
ngockhoi is currently offline  ngockhoi   France
Messages: 15
Registered: July 2003
Location: Paris
Karma: 0
Junior Member
I have a warning :

pg_num_fields(): supplied argument is not a valid PostgreSQL result resource in /var/www/html/vnu/adm/admdump.php on line 98

the code is
function sql_num_fields($r)
{
return __dbtype__ == 'pgsql' ? pg_num_fields($r['res']) : mysql_num_fields($r);
}

I think is pg_num_fields($r) but it can be the change for some think else ?.


if a chang it it make another warning :
pg_field_name(): supplied argument is not a valid PostgreSQL result resource in /var/www/html/vnu/adm/admdump.php on line 108

Best regards,
Re: Warning admdump.php [message #13533 is a reply to message #13532] Thu, 16 October 2003 18:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
For PostgreSQL pg_num_fields($r['res']) is the correct usage. The original failure implies that the query prior to the sql_num_fields() funciton had failed.

FUDforum Core Developer
Re: Warning admdump.php [message #13552 is a reply to message #13532] Fri, 17 October 2003 09:44 Go to previous messageGo to next message
ngockhoi is currently offline  ngockhoi   France
Messages: 15
Registered: July 2003
Location: Paris
Karma: 0
Junior Member
It strange, i don't undestant because it call by
function sql_is_null($r, $n, $tbl='') {
{...

$r = q('SELECT * FROM '.$tbl_name.' LIMIT 1');
$nf = sql_num_fields($r);
...
}

and the q( ... ) return the query result in db.inc

best regards


Re: Warning admdump.php [message #13555 is a reply to message #13552] Fri, 17 October 2003 12:28 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS. If you fetch admdump.php from CVS and replace the one you have the problem will go away.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Thread broken in Tree View of Forum
Next Topic: 2.5.0RC5: Moderation approval error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 07:01:09 GMT 2024

Total time taken to generate the page: 0.02792 seconds