Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 91 van 286

Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kan iemand me uitleggen waarom dit niet werkt:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/home/refresh/domains/klaas.s3.one2xs.com/public_html/SECRET/includes/config.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/home/refresh/domains/klaas.s3.one2xs.com/public_html/SECRET/includes/plaatsen/twitteroauth.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$select[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id, tweet, tijd, geplaatst, twitter_account FROM geplande_tweets WHERE geplaatst = 0"[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$twitter_account_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM twitter_accounts WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$twit[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][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]$select[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]0[/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]$twit[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$select[/COLOR][COLOR= #007700])){[/COLOR]
        [COLOR= #0000BB]$twitter_account_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM twitter_accounts WHERE id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$twit[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitter_account[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitter_account_query[/COLOR][COLOR= #007700]))
        {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]test[/COLOR][COLOR= #007700];[/COLOR]
    [COLOR= #0000BB]$tweet[/COLOR] [COLOR= #007700]= new[/COLOR] TwitterOAuth[COLOR= #007700]([/COLOR][COLOR= #0000BB]$twitter_account[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]consumerKey[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$twitter_account[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]consumerSecret[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$oAuthToken[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$oAuthSecret[/COLOR][COLOR= #007700]);
        }[/COLOR]
        [COLOR= #0000BB]$date[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d/m/Y/H/i"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$twit[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$exp[/COLOR]    [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"/"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$date[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"d"[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]$exp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]] &&[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"m"[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]$exp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]] &&[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Y"[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]$exp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]] &&[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"H"[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]$exp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]3[/COLOR][COLOR= #007700]] &&[/COLOR] [URL="http://www.php.net/date"]date[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"i"[/COLOR][COLOR= #007700]) ==[/COLOR] [COLOR= #0000BB]$exp[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]4[/COLOR][COLOR= #007700]]){[/COLOR]
            [COLOR= #0000BB]$tweet[/COLOR][COLOR= #007700]->[/COLOR]post[COLOR= #007700]([/COLOR][COLOR= #DD0000]statuses/update[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]status[/COLOR] [COLOR= #007700]=>[/COLOR] [COLOR= #0000BB]$twit[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tweet[/COLOR][COLOR= #007700]]));[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE geplande_tweets SET geplaatst = 1 WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$twit[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
        }

    }
}[/COLOR]
?>
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat werkt niet?
0
Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Milan schreef:
Wat werkt niet?
Geen error, hij doet gewoon niks.
Hij zou Tweet moeten plaatsen.
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Graag duidelijker zijn met wat er niet werkt.
Hoe kom je op regel 5 aan $twit?
Volgens mij stel je die pas in op regel 9
0
Berichten
5.498
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sjoerd schreef:
Graag duidelijker zijn met wat er niet werkt.
Hoe kom je op regel 5 aan $twit?
Volgens mij stel je die pas in op regel 9

Aangepast, hij zou een tweet moeten plaatsen + query uitvoeren maar hij doet geen van dit beide.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Ga eens debuggen en zorg bin elke if statement voor een echo....
Zo weet je hoe je script loopt en waar de fout zit....

Ga ook als de wiedeweerga en direct foutafhandeling op je queries toepassen.... (geen die()-rotzooi)
0
Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wie weet er iets leuks om te maken in C#. Niet te moeilijk. En ook niet iets heel groots smile
En kent er iemand geode tutorials coor C# kan zelf niet echt iets goeds vinden (wil geen filmpjes).
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Rekenmachine? Leuk als basis-oefening.
0
Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Rekenmachine? Leuk als basis-oefening.
Oe goed idee biggrinbiggrin
0
Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Iemand die weet om de koersen van de AEX index enz gratis op te halen?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Bartv schreef:
Iemand die weet om de koersen van de AEX index enz gratis op te halen?
Niet, zitten licenties op, en maar goed ook. Misschien de vertraagde koersen, maar ik betwijfel of die gratis zijn, wel een stuk goedkoper.

(Ja, rippen kan, maar succes met je boete dan, daar helpen we je ook niet mee)
0
Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
Eerdere citaten tonen
Bartv schreef:
Iemand die weet om de koersen van de AEX index enz gratis op te halen?
Niet, zitten licenties op, en maar goed ook. Misschien de vertraagde koersen, maar ik betwijfel of die gratis zijn, wel een stuk goedkoper.

(Ja, rippen kan, maar succes met je boete dan, daar helpen we je ook niet mee)
Oke dan houd t op yummie
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Weet iemand hoe je substr() kan gebruiken zonder html-tags te breken zegmaar?
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Milan schreef:
Weet iemand hoe je substr() kan gebruiken zonder html-tags te breken zegmaar?
De tags er uit filteren, substr gebruiken en tags terugzetten. Vraag me niet hoe je dat juist doet want lijkt me erg moeilijk confused
0
Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
C# vraag:

Ik ben bezig met een rekenmachine.

en dan heb ik 2 getallen in 2 vars:

var getal1 = 10;
var getal2 = 4;
var methode = "+";

Hoe laat ik dat dan rekenen bloosbloosheb al van alles geprobeerd maar het lukt niet. En op et internet krijg ik niet de oplossing hoe ik het wil.

Ik probeer bijv:

output.Text = getal1.methode.getal2;


Maar dat lukt niet bloos
Op het internet vind ik:

output.Text = getal1 + getal2;


Maar mijn var van methode kan van alles zijn. Bijv: +, -, /, *

Hoe kan ik zorgen dat hij gaat rekenen bloos??
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