Dylanh schreef:Regel 5, en regel 18 veranderen naar:Maar waar moet ik dan de scheld woorden neer zetten? Ik heb al op lijn 5 en 8 geprobeerd maar dat werkt niet?
$pos !== false
Dylanh schreef:Regel 5, en regel 18 veranderen naar:Maar waar moet ik dan de scheld woorden neer zetten? Ik heb al op lijn 5 en 8 geprobeerd maar dat werkt niet?
$lastChecked = 1354972000;
$text = mysql_query("SELECT * FROM logs WHERE > timestamp = ".$lastChecked." ORDER BY DESC"); Dylanh schreef:Ik wil alleen de laatste rows selecteren met SQL hoe doe ik dit?
Ik heb dit al geprobeerd maar dan komt er een error:
$lastChecked = 1354972000;
$text = mysql_query("SELECT * FROM logs WHERE > timestamp = ".$lastChecked." ORDER BY DESC"); Freestyle schreef:WHERE > timestamp kan neit moet zijnIk heb dit al geprobeerd maar dan komt er een error:Eerdere citaten tonen
Dylanh schreef:Ik wil alleen de laatste rows selecteren met SQL hoe doe ik dit?$lastChecked = 1354972000; $text = mysql_query("SELECT * FROM logs WHERE > timestamp = ".$lastChecked." ORDER BY DESC");
Error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:xampphtdocsschelden.php on line 9
toevoeging op 8 december 2012, 15:51:57:
Ik wil dus niet alles nog een keer controleren als dat al gebeurt is.

).Dylanh schreef:Maar als ik WHERE timestamp wil doen, selcteerd die dan alle logs daarna??Die var is wel nodig aan gezien ik LastChecked in uit de database wil halen, dit was nog voor test.
[COLOR= #0000BB]<?php
$lastChecked[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1354972000[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$text[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM logs WHERE timestamp > "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$lastChecked[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" ORDER BY DESC"[/COLOR][COLOR= #007700]);[/COLOR]
?> [COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] handler[COLOR= #007700]([/COLOR][COLOR= #0000BB]$str[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR]gebruikersnaam[COLOR= #007700]].[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$str[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]%gebruikersnaam%[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]handler[/COLOR][COLOR= #007700]);[/COLOR]
?>
hoi %gebruikersnaam%!
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/ob_end_flush"]ob_end_flush[/URL][COLOR= #007700]();[/COLOR]
?> [COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]_GEBRUIKERSNAAM_[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Hoi[/COLOR][COLOR= #007700].[/COLOR] _GEBRUIKERSNAAM_[COLOR= #007700];[/COLOR]
?> Timmie schreef:http://code.google.com/p/php-mobile-detectWeet iemand een class die het OS en Browser van de gebruiker detecteert en regelmatig geüpdate wordt?
Gamedealer schreef:Zoiets?[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/define"]define[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]_GEBRUIKERSNAAM_[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]);[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Hoi[/COLOR][COLOR= #007700].[/COLOR] _GEBRUIKERSNAAM_[COLOR= #007700];[/COLOR] ?>

Jvdw schreef:Dat is een geweldige class gebruik hem in veel projecten maar ik heb voor dit project ook informatie nodig van niet mobiele apparaten.http://code.google.com/p/php-mobile-detectEerdere citaten tonen
Timmie schreef:Weet iemand een class die het OS en Browser van de gebruiker detecteert en regelmatig geüpdate wordt?
Nickjexx schreef:Gebruik geen ob_start en ob_end_flush enzo, ECHT gewoon NIET.Wat is een betere manier voor dit:[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]function[/COLOR] handler[COLOR= #007700]([/COLOR][COLOR= #0000BB]$str[/COLOR][COLOR= #007700]){[/COLOR] [COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR]gebruikersnaam[COLOR= #007700]].[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$str[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]%gebruikersnaam%[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]);[/COLOR] [URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700]; }[/COLOR] [URL="http://www.php.net/ob_start"]ob_start[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]handler[/COLOR][COLOR= #007700]);[/COLOR] ?> hoi %gebruikersnaam%! [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/ob_end_flush"]ob_end_flush[/URL][COLOR= #007700]();[/COLOR] ?>
