Vreemd:S

Gestart doorShahiem2 reacties47 weergaven

3 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hi,

Meestal weet ik hier we een oplossing op maar nu doet me mysql wel heel raar. Ik heb de goede gegevens ingevuld en de ingevoerde tabel bestaat maar hij zegt dat ik niet ben verbonden met de database.

Quote:
Warning: mysql_query() [function.mysql-query]: Access denied for user apache@localhost (using password: NO) in /home/shahiem/domains/***/ on line 16

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/shahiem/domains/***/ on line 16
Access denied for user apache@localhost (using password: NO)

Code

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #DD0000]includes/config.php[/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 * FROM nieuws ORDER BY id DESC LIMIT 5"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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]$fetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]))
    {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fetch[/COLOR][COLOR= #007700]->[/COLOR]datum[COLOR= #007700];
        
    }[/COLOR]
?>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Er zit waarschijnlijk een fout in je config
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het is me gelukt, ik was me core class vergeten emo Daar zat nog een deel van mijn mysql in.
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