Mijn Uitbetalingen pagina

Gestart doorMikeb10 reacties50 weergaven

11 berichten · pagina 1 van 1

Mikeb

Lid · Topicstarter

Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoi,
Ik heb een probleempje confused Ik kom er niet uit (met michiel), hij geeft geen foutmelding maar mijn uitbetalingen worden niet weergegeven. Wie kan me helpen? xD
Het zit in het WHERE gebruiker = ".mysql_real_escape_string($user_id)."";

[COLOR= #0000BB]<?[/COLOR]php
[COLOR= #0000BB]$top2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `uitbetalen` WHERE gebruiker = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user_id[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$top1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top2[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top1[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]goedgekeurd[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]0[/COLOR][COLOR= #007700]){[/COLOR]
blablablablablabla
0
Berichten
2.837
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?[/COLOR]php
[COLOR= #0000BB]$top2[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `uitbetalen` WHERE gebruiker = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user_id[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top2[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]goedgekeurd[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]0[/COLOR][COLOR= #007700]){[/COLOR]
blablablablablabla
0
Mikeb

Lid · Topicstarter

Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maakt niks uit confused
0
Krm

Lid

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
bestaad die waarde wel?
0
Mikeb

Lid · Topicstarter

Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als ik het WHERE gebruiker = blablabla weghaal dan geef hij alles weer, maar ik wil het per persoon en dat doet hij niet confused en bij gebruiker staat het ID van die gebruiker.
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bestaat $user_id wel?
0
Mikeb

Lid · Topicstarter

Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij bestaat overal volgens mijyummie het zit ook in de referral pagina en daar doet alles het wel confused
0
Berichten
1.544
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zet eronder eens

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


En kijk wat er uitkomt.
En kijk of dat overeenkomt met wat er in je database staat.
0
Mikeb

Lid · Topicstarter

Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Werkt niet yummieHeb ff een query gemaakt maar werkt ook niet confused
[COLOR= #0000BB]<?[/COLOR]php
[COLOR= #0000BB]$user_id[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM users WHERE id=$_GET[id]"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$top2[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `uitbetalen` WHERE gebruiker = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$user_id[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top2[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]goedgekeurd[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]0[/COLOR][COLOR= #007700]){[/COLOR]
blablablablablabla
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Heb je een sessie of iets waar ID in staat?
0
Mikeb

Lid · Topicstarter

Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$query = mysql_query("SELECT `type`, aantal, goedgekeurd, gebruiker FROM uitbetalen WHERE gebruiker=(SELECT id FROM users WHERE user=".mysql_real_escape_string($_SESSION[user]).")");
$i = 0;
while($select = mysql_fetch_assoc($query)){
if($select[goedgekeurd] == 1){


Had hem ff anders gemaakt en toen werkte het ook niet maar dit is de oplossing biggrin
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