Sitebericht word niet weergeven?

Gestart doorMilan5 reacties32 weergaven

6 berichten · pagina 1 van 1

Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hey,

Ik zit met het volgende probleem, ik heb dit systeem dat controleerd of er nieuwe berichten zijn:

[COLOR= #0000BB]<?php
$mQuery[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM adminMessages WHERE uId = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]escape[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    
    [COLOR= #FF8000]//echo $mysql->num_rows($mQuery);[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700]))
    {[/COLOR]
    
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]num_rows[COLOR= #007700]([/COLOR][COLOR= #0000BB]$mQuery[/COLOR][COLOR= #007700]) !=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
        {[/COLOR]
        
            [COLOR= #0000BB]$mFetch[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]fetch[COLOR= #007700]([/COLOR][COLOR= #0000BB]$mQuery[/COLOR][COLOR= #007700]);[/COLOR]
        
            [COLOR= #0000BB]$layout[/COLOR][COLOR= #007700]->[/COLOR]top[COLOR= #007700]([/COLOR][COLOR= #DD0000]Website bericht[/COLOR][COLOR= #007700]);[/COLOR]
        
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$layout[/COLOR][COLOR= #007700]->[/COLOR]showError[COLOR= #007700]([/COLOR][COLOR= #DD0000]y[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tekst[/COLOR][COLOR= #007700]])) .[/COLOR] [COLOR= #DD0000]<br /><br /><strong>Je kunt verdergaan met je bezoek door <a href="[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]siteUrl [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_URI[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]">hier</a> te klikken</strong>[/COLOR][COLOR= #007700]);[/COLOR]
        
            [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"DELETE FROM adminMessages WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$mFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
        
            [COLOR= #0000BB]$layout[/COLOR][COLOR= #007700]->[/COLOR]bottom[COLOR= #007700]();[/COLOR]
        
            [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
        
        }
    
    }[/COLOR]
?>


Maar nu weergeeft hij het bericht niet.. Als ik de verwijder query weglaat doet hij het wel.

Weet iemand hoe dit komt?

Groet,
Milan
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Wat doet de query() functie van deze class.
0
Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] query[COLOR= #007700]([/COLOR][COLOR= #0000BB]$input[/COLOR] [COLOR= #007700]=[/COLOR] NULL[COLOR= #007700])
    {[/COLOR]
        try 
        [COLOR= #007700]{[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$input[/COLOR] [COLOR= #007700]!=[/COLOR] NULL[COLOR= #007700])
            {[/COLOR]
                [COLOR= #0000BB]$TimeStart[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/microtime"]microtime[/URL][COLOR= #007700]();[/COLOR]    
                [COLOR= #0000BB]$sQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$input[/COLOR][COLOR= #007700]);[/COLOR]
                    
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sQuery[/COLOR] [COLOR= #007700]!==[/COLOR] FALSE[COLOR= #007700])
                {[/COLOR]
                    [COLOR= #0000BB]$TimeTotal[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/microtime"]microtime[/URL][COLOR= #007700]() -[/COLOR] [COLOR= #0000BB]$TimeStart[/COLOR][COLOR= #007700];[/COLOR]
                    [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]QueryTimer [COLOR= #007700]+=[/COLOR] [COLOR= #0000BB]$TimeTotal[/COLOR][COLOR= #007700];[/COLOR]
                    [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]QueryTimeArray[COLOR= #007700][] =[/COLOR] [COLOR= #0000BB]$TimeTotal[/COLOR][COLOR= #007700];[/COLOR]
                    [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]QueryQueryArray[COLOR= #007700][] =[/COLOR] [COLOR= #0000BB]$input[/COLOR][COLOR= #007700];[/COLOR]
                    [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]QueryCount[COLOR= #007700]++;[/COLOR]
                    [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$sQuery[/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL]
                [COLOR= #007700]{[/COLOR]
                    [COLOR= #0000BB]$ErrorString[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Query failed to execute<br />[/COLOR][COLOR= #007700];[/COLOR]
                    [COLOR= #0000BB]$ErrorString[/COLOR] [COLOR= #007700].=[/COLOR] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]() .[/COLOR] [COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
                    [COLOR= #0000BB]$ErrorString[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]Query: [/COLOR] [COLOR= #007700].[/COLOR]  [COLOR= #0000BB]$input[/COLOR][COLOR= #007700];[/COLOR]
                    throw [COLOR= #007700]new[/COLOR] Exception[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ErrorString[/COLOR][COLOR= #007700]);
                }          
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL]
            [COLOR= #007700]{[/COLOR]
                throw [COLOR= #007700]new[/COLOR] Exception[COLOR= #007700]([/COLOR][COLOR= #DD0000]Query is empty[/COLOR][COLOR= #007700]);
            }
        }[/COLOR]
        catch[COLOR= #007700]([/COLOR]Exception [COLOR= #0000BB]$e[/COLOR][COLOR= #007700])
        {[/COLOR]
            [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]error[COLOR= #007700]([/COLOR][COLOR= #0000BB]$e[/COLOR][COLOR= #007700]);
        }
    }[/COLOR]

?>


Is uit Rik zijn MySQL class.
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Zozo, das een oude class van mij ja bloos
Probeer eens eerst layout->bottom te doen, en daarna te deleten?

Ik heb een gevoel dat je met iets als ob_* werkt, en dat kan soms hele rare situaties opleveren.
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
Zozo, das een oude class van mij ja bloos
Probeer eens eerst layout->bottom te doen, en daarna te deleten?

Ik heb een gevoel dat je met iets als ob_* werkt, en dat kan soms hele rare situaties opleveren.
Even offtopic, maar die class gebruik ik ook nog steeds hoor yummie
0
Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ob_* werk ik niet mee, is rotzooi.

Zal eens proberen Rik

toevoeging op 16 februari 2012, 15:29:51:
Nope werkt niet
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