Wat is hier fout?

Gestart doorShahiem2 reacties33 weergaven

3 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik weet dat het fout is, maar weet ook niet hoe ik het moet oplossensadley
Code:

$cat_sql = mysql_query("SELECT * FROM `forum_cata` WHERE `id` = " . ORDER BY id DESC LIMIT  mysql_real_escape_string($_GET[c]) . "")  or trigger_error(mysql_error());
            if(mysql_num_rows($cat_sql))
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
WHERE `id` = " . ORDER BY


Dit klopt niet, je geeft niet aan WAT de id is, maar gaat gewoon verder
Michien ook BTW handig om de eroor te postenbiggrin
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$cat_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `forum_cata` WHERE `id` = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]c[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]" ORDER BY id DESC"[/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/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cat_sql[/COLOR][COLOR= #007700]))[/COLOR]
?>
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