ERROR: Unable to identify a prefix operator '!' for type 'integer' [message #16484] |
Sun, 01 February 2004 19:53  |
Sebastian_T
 Messages: 33 Registered: January 2004 Location: Warsaw, Poland
Karma: 0
|
Member |
|
|
FUD on postgreSQL v. 7.3, upgraded from 2.3.8. to 2.6.0
when trying to accept posts in premoderated forum, shows an error:
(/usr/local/apache/htdocs/forum.blizniaki.net/index.php:141
/usr/local/apache/htdocs/forum.blizniaki.net/index.php:232
/usr/local/apache/htdocs/forum.blizniaki.net/theme/default/modque.php:1948
/usr/local/apache/htdocs/forum.blizniaki.net/index.php:1185
) : ERROR: Unable to identify a prefix operator '!' for type 'integer' You may need to add parentheses or an explicit cast
Query: SELECT CASE WHEN !(9600246 & 1048576) THEN mm.id ELSE 1 END FROM fud23_msg m INNER JOIN fud23_thread t ON m.thread_id=t.id LEFT JOIN fud23_mod mm ON t.forum_id=mm.forum_id AND mm.user_id=4 WHERE m.id=11314
Server Version:
[Referring Page] http://forum.blizniaki.net/index.php?t=modque&SQ=e0ed5a526d4ddac085e7ac 991945a699
postgreq does not accept '!' as an integer in line:
f (!q_singleval('SELECT CASE WHEN !('.$usr->users_opt.' & 1048576) THEN mm.id ELSE 1 END FROM fud23_msg m INNER JOIN fud23_thread t ON m.t
hread_id=t.id LEFT JOIN fud23_mod mm ON t.forum_id=mm.forum_id AND mm.user_id='._uid.' WHERE m.id='.($appr ? $appr : $del))) {
as a newbe, no ideas... 
Sebastian
PS. And so to run something, we changed:
if (!q_singleval('SELECT CASE WHEN !('.$usr->users_opt.' & 1048576) THEN mm.id ELSE 1 END FROM fud23_msg m INNER JOIN fud23_thread t ON m.t
hread_id=t.id LEFT JOIN fud23_mod mm ON t.forum_id=mm.forum_id AND mm.user_id='._uid.' WHERE m.id='.($appr ? $appr : $del))) {
to:
if (!q_singleval('SELECT CASE WHEN (('.$usr->users_opt.' & 1048576) > 0) THEN mm.id ELSE 1 END FROM fud23_msg m INNER JOIN fud23_thread t ON m.t
hread_id=t.id LEFT JOIN fud23_mod mm ON t.forum_id=mm.forum_id AND mm.user_id='._uid.' WHERE m.id='.($appr ? $appr : $del))) {
now it does not show an error, but also does not accept posts 
Sebastian
[Updated on: Sun, 01 February 2004 20:26] Report message to a moderator
|
|
|
|
|
|
|