Msqyl num rows

Gestart doorShahiem2 reacties31 weergaven

3 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik krijg een mysql num rows fout.

Fout:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/shahiem/domains/shahiem.one2xs.com/public_html/layout/inc/functies.php on line 6

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/shahiem/domains/shahiem.one2xs.com/public_html/layout/inc/functies.php on line 6
AanmeldenForumInformatieLinkpartnersHelp

Code;

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] ingelogd[COLOR= #007700]() {[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hash[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT 1 FROM sessies WHERE hash = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_COOKIE[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hash[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" AND ip = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
            [URL="http://www.php.net/return"]return[/URL] TRUE[COLOR= #007700];
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/return"]return[/URL] FALSE[COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/return"]return[/URL] TRUE[COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] FALSE[COLOR= #007700];
    }
}[/COLOR]
?>
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bump yummie
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
wat is een msqyl query ?

bestaat de tabel
sessies wel?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren