[PHP] Resource id #14

Gestart doorDylan5 reacties28 weergaven

6 berichten · pagina 1 van 1

Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Ik heb deze codes;
Query;

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Tellen van de users[/COLOR]
[COLOR= #0000BB]$total[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]SELECT * FROM users[/COLOR][COLOR= #007700]);[/COLOR]
?>


Echo;

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$total[/COLOR] ?>


Maar dan zegt die Resource id #14 wat is er mis?
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je moet ehm eerst nog fetchen met mysql_fetch_assoc smile
EDIT: Idd.. mysql_num_rows emo
0
Thom

Lid

Berichten
10.654
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je wilt ze tellen? Probeer:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$total[/COLOR][COLOR= #007700]);[/COLOR] ?>
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Superb schreef:
Je moet ehm eerst nog fetchen met mysql_fetch_assoc smile
Gedaan maar krijg nog steedst het zelfde;

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Tellen van de users[/COLOR]
[COLOR= #0000BB]$total[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]SELECT * FROM users[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$total[/COLOR][COLOR= #007700]);[/COLOR]
?>


Zelfde;
Thommity schreef:
Je wilt ze tellen? Probeer:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$total[/COLOR][COLOR= #007700]);[/COLOR] ?>
Nu heb ik een witte pagina

toevoeging op 6 april 2012, 11:55:08:
Werkt nu! Hoe krijg ik +1 er bij?
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
door +1 erbij te zetten.

Oh, en doe SELECT 1 FROM users als je enkel wil tellen.
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Lennard schreef:
door +1 erbij te zetten.

Oh, en doe SELECT 1 FROM users als je enkel wil tellen.
oke ik heb bedankt smile
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