Berichtenbalk

Gestart doorShahiem6 reacties35 weergaven

7 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een berichtbalk maar bij de namen weergeeft hij alleen de naam Admin (Dus ik), Bijvoorbeeld als je op een andere naam bent weergeeft hij admin emo
Hoe los ik dat op?

Code:

[COLOR= #0000BB]<?php
$querys[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT bericht FROM berichtenbalk ORDER BY id DESC LIMIT 0,8"[/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]$querys[/COLOR][COLOR= #007700]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<marquee width="100%" onmouseover="this.stop()" loop="-1" onmouseout="this.start()"><b><a 

href="index.php?p=berichtenbalk_plaats">Plaats een bericht ||</a></b>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]))
    {[/COLOR]
                 [COLOR= #0000BB]$nameQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT uId, uName, uCol FROM 

member_accounts"[/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]$nameQuery[/COLOR][COLOR= #007700]))
            {[/COLOR]
                [COLOR= #0000BB]$nameFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$nameQuery[/COLOR][COLOR= #007700]);[/COLOR]
                        
                        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]            <a 

href="">[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$nameFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]</b></a> - [/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]  [/COLOR][COLOR= #007700];

                    }
}[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
                <br>
</marquee>[/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]
                De berichtbalk is leeg.[/COLOR][COLOR= #007700];
                }[/COLOR]
                ?>
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$nameQuery = mysql_query("SELECT uId, uName, uCol FROM

member_accounts");

hij selecteert dus alle uids, unames en ucols uit member_accounts

en daarna fetcht hij dus de eerste?
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja, ucol hoort er niet bij.
Die moet ik nog weghalen
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Hoe word het id van de gebruiker gekoppeld aan het bericht?

Dan maak ik wel ff iets voor je.
0
Tom

Lid

Berichten
3.868
Reputatie
0
Punten
0,02
Lid sinds
Laatst gezien
weergeeft het is geeft weeremo.
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Ja, ucol hoort er niet bij.
Die moet ik nog weghalen

komt er niet iets in je op door mijn bericht ofzo? dat je wel moet ophalen wie het bericht gepost heeft in die shout tabel zelf, en dan dat id ophalen in de leden tabel ? emo
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sjoerd schreef:
Eerdere citaten tonen
Shahiem schreef:
Ja, ucol hoort er niet bij.
Die moet ik nog weghalen

komt er niet iets in je op door mijn bericht ofzo? dat je wel moet ophalen wie het bericht gepost heeft in die shout tabel zelf, en dan dat id ophalen in de leden tabel ? emo
Ja je eerste bericht snapte ik niet maar nu wel 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