Vraag php uitlezen database

Gestart doorSebas14 reacties60 weergaven

15 berichten · pagina 1 van 1

Sebas

Lid · Topicstarter

Berichten
5.209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?PHP[/COLOR]
[URL="http://www.php.net/Ob_Start"]Ob_Start[/URL][COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/Include"]Include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"includes/include.php"[/COLOR][COLOR= #007700]);[/COLOR]

        [COLOR= #0000BB]$uitbetalingen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC"[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$sel[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/Mysql_Query"]Mysql_Query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$select[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Hieronder vind je de uitbetalingen<br><br>"[/COLOR][COLOR= #007700];[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"
        <table width=450 cellspacing=0 cellpadding=0>
        <tr>
        <td bgcolor=#DEDEDE width=10% class=tabel><b>#</b></td>
        <td bgcolor=#DEDEDE width=20% class=tabel><b>naar</b></td>
        <td bgcolor=#DEDEDE width=30% class=tabel><b>hoeveel</b></td>
        <td bgcolor=#DEDEDE width=20% class=tabel><b>uitbetaald</b></td>
        </tr>"[/COLOR][COLOR= #007700];[/COLOR]

        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sel[/COLOR][COLOR= #007700])) {[/COLOR]
        
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<tr>
        <table width=450 cellspacing=0 cellpadding=0>
        <tr>
        <td bgcolor=#FFFFFF width=10% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=20% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR]kleur[COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naar[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=30% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hoeveel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=20% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaald[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        </tr>"[/COLOR][COLOR= #007700];

        }[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</table>"[/COLOR][COLOR= #007700];[/COLOR]
        
?>


Alleen hij geeft niks weer uit de database wel de tabelen.

Voorbeeld: http://bit.ly/a3GmpK
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$select bestaat niet dus kan $sel = Mysql_Query($select); niet uitgevoerd worden
0
Berichten
3.283
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
@Luuk, je hebt gelijk had nog niet eens tot daar gekeken wink
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?PHP[/COLOR]
[URL="http://www.php.net/Ob_Start"]Ob_Start[/URL][COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/Include"]Include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"includes/include.php"[/COLOR][COLOR= #007700]);[/COLOR]

        [COLOR= #0000BB]$uitbetalingen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC"[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Hieronder vind je de uitbetalingen<br><br>"[/COLOR][COLOR= #007700];[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"
        <table width=450 cellspacing=0 cellpadding=0>
        <tr>
        <td bgcolor=#DEDEDE width=10% class=tabel><b>#</b></td>
        <td bgcolor=#DEDEDE width=20% class=tabel><b>naar</b></td>
        <td bgcolor=#DEDEDE width=30% class=tabel><b>hoeveel</b></td>
        <td bgcolor=#DEDEDE width=20% class=tabel><b>uitbetaald</b></td>
        </tr>"[/COLOR][COLOR= #007700];[/COLOR]

        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uitbetalingen[/COLOR][COLOR= #007700])) {[/COLOR]
        
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<tr>
        <table width=450 cellspacing=0 cellpadding=0>
        <tr>
        <td bgcolor=#FFFFFF width=10% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=20% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR]kleur[COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naar[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=30% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hoeveel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=20% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaald[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        </tr>"[/COLOR][COLOR= #007700];

        }[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</table>"[/COLOR][COLOR= #007700];[/COLOR]
        
?>

biggrin
0
Sebas

Lid · Topicstarter

Berichten
5.209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Superb schreef:
[COLOR= #0000BB]<?PHP[/COLOR]
[URL="http://www.php.net/Ob_Start"]Ob_Start[/URL][COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/Include"]Include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"includes/include.php"[/COLOR][COLOR= #007700]);[/COLOR]

        [COLOR= #0000BB]$uitbetalingen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC"[/COLOR][COLOR= #007700]);[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Hieronder vind je de uitbetalingen<br><br>"[/COLOR][COLOR= #007700];[/COLOR]

        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"
        <table width=450 cellspacing=0 cellpadding=0>
        <tr>
        <td bgcolor=#DEDEDE width=10% class=tabel><b>#</b></td>
        <td bgcolor=#DEDEDE width=20% class=tabel><b>naar</b></td>
        <td bgcolor=#DEDEDE width=30% class=tabel><b>hoeveel</b></td>
        <td bgcolor=#DEDEDE width=20% class=tabel><b>uitbetaald</b></td>
        </tr>"[/COLOR][COLOR= #007700];[/COLOR]

        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$uitbetalingen[/COLOR][COLOR= #007700])) {[/COLOR]
        
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<tr>
        <table width=450 cellspacing=0 cellpadding=0>
        <tr>
        <td bgcolor=#FFFFFF width=10% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=20% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR]kleur[COLOR= #007700]([/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naar[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=30% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]hoeveel[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        <td bgcolor=#FFFFFF width=20% class=tabel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$show[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaald[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</td>
        </tr>"[/COLOR][COLOR= #007700];

        }[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</table>"[/COLOR][COLOR= #007700];[/COLOR]
        
?>
biggrin
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/sebastiaan/domains/dutchklikjes.nl/public_html/uitbetalingen.php on line 18
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Is NAAM wel met hoofdletters eigenlijk??

$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC");
0
Sebas

Lid · Topicstarter

Berichten
5.209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Superb schreef:
Is NAAM wel met hoofdletters eigenlijk??
$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC");

Van alles geprobeerd maar lukt niet cry
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Typ eens achter

Verander

$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC");

eens in

$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC") or die(mysql_error());

Komt er dan een andere error??
0
Sebas

Lid · Topicstarter

Berichten
5.209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Superb schreef:
Typ eens achter

Verander

$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC");

eens in

$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY NAAM ASC") or die(mysql_error());

Komt er dan een andere error??
Unknown column NAAM in order clause
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dan bestaat NAAM dus niet in je database tabel emo
0
Sebas

Lid · Topicstarter

Berichten
5.209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Superb schreef:
Dan bestaat NAAM dus niet in je database tabel emo
Jah maar hij moet Uitbetaling uitlezen uit me database. zoals je wel ziet: FROM uitbetaling
0
Berichten
2.692
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
De kolom in uitbetaling,
heb je daar een kolom met de naam; naam of NAAM
Als het naam is moet je de volgende Query doen:

$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY naam ASC") or die(mysql_error());
0
Sebas

Lid · Topicstarter

Berichten
5.209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Superb schreef:
De kolom in uitbetaling,
heb je daar een kolom met de naam; naam of NAAM
Als het naam is moet je de volgende Query doen:

$uitbetalingen = mysql_query("SELECT id, naar, hoeveel,uitbetaald FROM uitbetaling ORDER BY naam ASC") or die(mysql_error());
bedankt hoe krijg ik nu dat de hoogste 53 in dit geval boven aan staat?
0
Berichten
1.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ORDER BY naam DESC

Dacht ik
0
Sebas

Lid · Topicstarter

Berichten
5.209
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kenzo schreef:
ORDER BY naam DESC

Dacht ik
bedankt gelukt 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