Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 32 van 286

Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rogier schreef:
Als je minder wil moet je in je query een LIMIT toevoegen.

Als je bij resultaat 20 tot 40 wil moet je LIMIT 20,40 doen.
Het is een ticket systeem, niet iedereen wil iemand anders ticket zien?

Hij moet gewoon elk ticket apart weergeven.
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
WHERE user_id = xx


Toevoegen?
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het werkt zo:

Quote:
http://SITE/webshop/admin/?p=tickets&naam=desire&c=30e936a16bdf7a13e3854e793fac7b09d4673eeb

&c=30e936a16bdf7a13e3854e793fac7b09d4673eeb

= ticket in de SQL
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rogier schreef:
Als je minder wil moet je in je query een LIMIT toevoegen.
Als je bij resultaat 20 tot 40 wil moet je LIMIT 20,40 doen.
Dit moet ik ff verbeteren: Je moet LIMIT 20,20 doen (Vanaf 20 de komende 20)

// @ Desire, in je query toevoegen (vóór order by dacht ik)
WHERE id (of hoe je field ook heet) = " . mysql_real_escape_string($_GET[c]) . "
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Fass schreef:
Eerdere citaten tonen
Rogier schreef:
Als je minder wil moet je in je query een LIMIT toevoegen.
Als je bij resultaat 20 tot 40 wil moet je LIMIT 20,40 doen.
Dit moet ik ff verbeteren: Je moet LIMIT 20,20 doen (Vanaf 20 de komende 20)

// @ Desire, in je query toevoegen (vóór order by dacht ik)
WHERE id (of hoe je field ook heet) = " . mysql_real_escape_string($_GET[c]) . "

Al geprobeerd werkt niet.
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geef je query dan eens?
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hier de hele codeemo
[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets ORDER BY ticket ASC"[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]===[/COLOR] false[COLOR= #007700]) 
{[/COLOR]
    [COLOR= #FF8000]// mysql error[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] 
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="datum">
            <span>
                [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]naam [COLOR= #007700].[/COLOR] [COLOR= #DD0000]  [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]achternaam [COLOR= #007700].[/COLOR][COLOR= #DD0000]
            </span>
            
            schreef op: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]datum [COLOR= #007700].[/COLOR][COLOR= #DD0000], om[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]tijd [COLOR= #007700].[/COLOR][COLOR= #DD0000]
          </div>[/COLOR][COLOR= #007700];[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700]->[/COLOR]bericht [COLOR= #007700].[/COLOR][COLOR= #DD0000]
          <div style="border-bottom: 1px solid #000; margin: 0 auto;"></div>[/COLOR][COLOR= #007700];
    
    }
          
}[/COLOR]
?>
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kun je je PhpMyAdmin structuur van die tickets tabel tonen?
+ maybe de waardes, als je die wil tonen.
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Komt eraan.

toevoeging op 21 juni 2012, 18:55:28:

`id` int(11) NOT NULL AUTO_INCREMENT,
  `naam` text NOT NULL,
  `achternaam` text NOT NULL,
  `email` text NOT NULL,
  `onderwerp` text NOT NULL,
  `ticket` text NOT NULL,
  `bericht` text NOT NULL,
  `closed` text NOT NULL,
  `datum` date NOT NULL,
  `tijd` time NOT NULL,
  PRIMARY KEY (`id`)
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Hier de hele codeemo
[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets WHERE ticket = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]c[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) 
{[/COLOR]
    [COLOR= #FF8000]// mysql error[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]A database error occured[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] 
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="datum">
            <span>
                [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]  [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
            </span>
            
            schreef op: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000], om [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          </div>[/COLOR][COLOR= #007700];[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          <div style="border-bottom: 1px solid #000; margin: 0 auto;"></div>[/COLOR][COLOR= #007700];
    
    }
          
}[/COLOR]
?>
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Raaoul schreef:
Dan heb ik nog een laatste vraagje. Hoe bereken ik de pagina waar een bericht op staat? Want ik wil zon postredir ding maken yummie
Duidelijker?

"Hoe bereken ik en pagina"

Dat snap ik niet nooo
Hoe bereken ik op welke pagina de post staat? Duidelijk toch?
Oww wink
SELECT COUNT(*) FROM topics WHERE id=DIETOPICIDVANPOST AND datum niet later was dan postdatum van post

Dan heb je het aantal posts voor die post van post die je wilt bereken inclusief die zelf. Dat deel je door het aantal berichten per pagina en rond je omhoog af met de ceil() functie wink
Van jouw uitleg klopt dus helemaal niks. Heb het geprobeerd, maar hij geeft altijd verkeerde resultaten. (verkeerde pagina, soms ook gewoon een SQL bound error...)

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] postRedirAction[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_helper[COLOR= #007700]->[/COLOR]layout[COLOR= #007700]()->[/COLOR]disableLayout[COLOR= #007700]();[/COLOR] 
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_helper[COLOR= #007700]->[/COLOR]viewRenderer[COLOR= #007700]->[/COLOR]setNoRender[COLOR= #007700]([/COLOR]true[COLOR= #007700]);[/COLOR]
        
        [COLOR= #0000BB]$postId[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_request[COLOR= #007700]->[/COLOR]getParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]);[/COLOR]
        
        [COLOR= #0000BB]$postModel[/COLOR] [COLOR= #007700]= new[/COLOR] Application_Model_TopicMessage[COLOR= #007700]([/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$topicModel[/COLOR] [COLOR= #007700]= new[/COLOR] Application_Model_Topic[COLOR= #007700]([/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]);[/COLOR]
        
        [COLOR= #0000BB]$post[/COLOR]      [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$postModel[/COLOR][COLOR= #007700]->[/COLOR]findTopicMessageById[COLOR= #007700]([/COLOR][COLOR= #0000BB]$postId[/COLOR][COLOR= #007700]);[/COLOR]
        
        
        [COLOR= #0000BB]$postEarlier[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$postModel[/COLOR][COLOR= #007700]->[/COLOR]getTopicMessagesEarlierThenById[COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]topic_id[COLOR= #007700],[/COLOR] [COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]date_posted[COLOR= #007700])) +[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//+1 voor post zelf[/COLOR]
        [COLOR= #0000BB]$page[/COLOR]        [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/ceil"]ceil[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$postEarlier[/COLOR] / [COLOR= #0000BB]20[/COLOR][COLOR= #007700]);[/COLOR]
    
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_redirect[COLOR= #007700]([/COLOR][COLOR= #DD0000]/forum/topic/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]topic_id [COLOR= #007700].[/COLOR] [COLOR= #DD0000]/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$page[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]#[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]id[COLOR= #007700]);
    }[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] getTopicMessagesEarlierThenById[COLOR= #007700]([/COLOR][COLOR= #0000BB]$topicId[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$date[/COLOR][COLOR= #007700])
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]->[/COLOR]fetchAll[COLOR= #007700]([/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]->[/COLOR]select[COLOR= #007700]()->[/COLOR]from[COLOR= #007700]([/COLOR][COLOR= #DD0000]forum_messages[/COLOR][COLOR= #007700])->[/COLOR]where[COLOR= #007700]([/COLOR][COLOR= #DD0000]topic_id = ? AND date_posted < "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$date[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$topicId[/COLOR][COLOR= #007700]));
    }[/COLOR]
?>
0
Fass

Lid

Berichten
3.771
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bedoel je gewoon round([Post nummer] / [Posts per pagina] + 0.5)?
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Bedoel je dit? $page = round($post->id / 20 + 0.5);

Nee dat werkt ook niet.. Daarmee geraaak ik iedere keer op page 1.

toevoeging op 21 juni 2012, 23:44:14:
Ik heb het zo opgelost

$page = round($post->id / 21 + 1);
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Raaoul schreef:
Eerdere citaten tonen
Antonn schreef:
Eerdere citaten tonen
Raaoul schreef:
Dan heb ik nog een laatste vraagje. Hoe bereken ik de pagina waar een bericht op staat? Want ik wil zon postredir ding maken yummie
Duidelijker?

"Hoe bereken ik en pagina"

Dat snap ik niet nooo
Hoe bereken ik op welke pagina de post staat? Duidelijk toch?
Oww wink
SELECT COUNT(*) FROM topics WHERE id=DIETOPICIDVANPOST AND datum niet later was dan postdatum van post

Dan heb je het aantal posts voor die post van post die je wilt bereken inclusief die zelf. Dat deel je door het aantal berichten per pagina en rond je omhoog af met de ceil() functie wink
Van jouw uitleg klopt dus helemaal niks. Heb het geprobeerd, maar hij geeft altijd verkeerde resultaten. (verkeerde pagina, soms ook gewoon een SQL bound error...)

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] postRedirAction[COLOR= #007700]()
    {[/COLOR]
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_helper[COLOR= #007700]->[/COLOR]layout[COLOR= #007700]()->[/COLOR]disableLayout[COLOR= #007700]();[/COLOR] 
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_helper[COLOR= #007700]->[/COLOR]viewRenderer[COLOR= #007700]->[/COLOR]setNoRender[COLOR= #007700]([/COLOR]true[COLOR= #007700]);[/COLOR]
        
        [COLOR= #0000BB]$postId[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_request[COLOR= #007700]->[/COLOR]getParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]);[/COLOR]
        
        [COLOR= #0000BB]$postModel[/COLOR] [COLOR= #007700]= new[/COLOR] Application_Model_TopicMessage[COLOR= #007700]([/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$topicModel[/COLOR] [COLOR= #007700]= new[/COLOR] Application_Model_Topic[COLOR= #007700]([/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]);[/COLOR]
        
        [COLOR= #0000BB]$post[/COLOR]      [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$postModel[/COLOR][COLOR= #007700]->[/COLOR]findTopicMessageById[COLOR= #007700]([/COLOR][COLOR= #0000BB]$postId[/COLOR][COLOR= #007700]);[/COLOR]
        
        
        [COLOR= #0000BB]$postEarlier[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$postModel[/COLOR][COLOR= #007700]->[/COLOR]getTopicMessagesEarlierThenById[COLOR= #007700]([/COLOR][COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]topic_id[COLOR= #007700],[/COLOR] [COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]date_posted[COLOR= #007700])) +[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]//+1 voor post zelf[/COLOR]
        [COLOR= #0000BB]$page[/COLOR]        [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/ceil"]ceil[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$postEarlier[/COLOR] / [COLOR= #0000BB]20[/COLOR][COLOR= #007700]);[/COLOR]
    
        [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]_redirect[COLOR= #007700]([/COLOR][COLOR= #DD0000]/forum/topic/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]topic_id [COLOR= #007700].[/COLOR] [COLOR= #DD0000]/[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$page[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]#[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$post[/COLOR][COLOR= #007700]->[/COLOR]id[COLOR= #007700]);
    }[/COLOR]
[URL="http://www.php.net/public"]public[/URL] [COLOR= #007700]function[/COLOR] getTopicMessagesEarlierThenById[COLOR= #007700]([/COLOR][COLOR= #0000BB]$topicId[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$date[/COLOR][COLOR= #007700])
    {[/COLOR]
        [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]->[/COLOR]fetchAll[COLOR= #007700]([/COLOR][COLOR= #0000BB]$this[/COLOR][COLOR= #007700]->[/COLOR]dbAdapter[COLOR= #007700]->[/COLOR]select[COLOR= #007700]()->[/COLOR]from[COLOR= #007700]([/COLOR][COLOR= #DD0000]forum_messages[/COLOR][COLOR= #007700])->[/COLOR]where[COLOR= #007700]([/COLOR][COLOR= #DD0000]topic_id = ? AND date_posted < "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$date[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$topicId[/COLOR][COLOR= #007700]));
    }[/COLOR]
?>

Raar confused
Als je alle reacties uit de database haalt die in die topic gepost waren voor die reactie die je wou + 1, en dat deelt door het aantal resultaten per pagina en die afrond omlaag zou je toch de juiste pagina moeten krijgen confused
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Fass schreef:
Eerdere citaten tonen
Desire schreef:
Hier de hele codeemo
[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets WHERE ticket = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]c[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) 
{[/COLOR]
    [COLOR= #FF8000]// mysql error[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]A database error occured[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] 
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="datum">
            <span>
                [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]  [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
            </span>
            
            schreef op: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000], om [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          </div>[/COLOR][COLOR= #007700];[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          <div style="border-bottom: 1px solid #000; margin: 0 auto;"></div>[/COLOR][COLOR= #007700];
    
    }
          
}[/COLOR]
?>

Nee dan weergeeft hij weer helemaal niks, snap er niks van confused
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