• Member Avatar for cereal
    cereal

    Replied To a Post in Best way to store data before moving to database

    Just an addition: you could use an sqlite3 database to store that amout of data and then retrieve it through a PHP script. Something like this example script: * https://www.daniweb.com/programming/databases/threads/499516/migrating-data-between-sqlite-and-mysql#post2184579 …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Unable to display correct current date

    Hi, sure there is no `%` in front of `20`? Can you show us more details of the script in which you create the date? Have you tried the above …
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in The used SELECT statements have a different number of columns?

    UNION and UNION ALL statements should have individual select statements having the same number of columns. If you know the number of columns are different, you can add "dummy" columns …
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in The used SELECT statements have a different number of columns?

    UNION and UNION ALL statements should have individual select statements having the same number of columns. If you know the number of columns are different, you can add "dummy" columns …
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in The used SELECT statements have a different number of columns?

    UNION and UNION ALL statements should have individual select statements having the same number of columns. If you know the number of columns are different, you can add "dummy" columns …
  • Member Avatar for cereal
    cereal

    Began Watching cloud suggestions

    I need some suggestions on a good cloud server I could use to backup my computer. I want to backup my data (music, pictures, videos, etc...) and I also want …
  • Member Avatar for cereal
    cereal

    Gave Reputation to minitauros in The used SELECT statements have a different number of columns?

    JOIN works if tables have different column names. Example: SELECT table_a.name, table_b.username FROM table_a JOIN table_b ON table_a.user_id = table_b.user_id WHERE table_a.user_id = 1 In the `ON` part of the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in The used SELECT statements have a different number of columns?

    > what's that 'as dummy_3 ' ?? It's `'' as dummy_3` i.e. empty space defined with an alias, it will return an empty column, for example: select '' as dummy_3; …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Calculate in PHP

    It happens because of: //If form is of GET type $x = filter_input(INPUT_GET, 'howmanytimes', FILTER_SANITIZE_NUMBER_INT); //if form is of POST type $x = filter_input(INPUT_POST, 'howmanytimes', FILTER_SANITIZE_NUMBER_INT); If using a **GET** …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Calculate in PHP

    Hmm, it works fine for me. What you get? Could be the array, if using PHP version prior to 5.4 then replace `[null, false]` with `array(null, false)`.
  • Member Avatar for cereal
    cereal

    Replied To a Post in The used SELECT statements have a different number of columns?

    And how would you know which result sets belongs to what? If you're expecting a row for each table, then you could add empty columns: select id, name, lastname from …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Calculate in PHP

    About the function issue: the form will send strings, so `filter_input()` will return strings or: * **FALSE** when condition fails * **NULL** when variable name is not set, i.e. when …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Bug in Discussion posting system

    Hi, by using four spaces or one tab, the system will set the paragraph into a block code. For more information check the syntax helper: * https://www.daniweb.com/community/syntax#code
  • Member Avatar for cereal
    cereal

    Replied To a Post in [PHP] Cannot edit variables within do-while.

    Ops! I'm sorry, I didn't noticed it was a challenge... o_o' Now that I see that link I understand... I solved this some time ago... :D I can say that …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to make REST API in Codeigniter?

    In addition: so what you're searching for is a client to query remote services? Have you considered Guzzle? * https://github.com/guzzle/guzzle * http://docs.guzzlephp.org/en/latest/index.html You can integrate it into CI3 by using …
  • Member Avatar for cereal
    cereal

    Replied To a Post in [PHP] Cannot edit variables within do-while.

    Something like this will fit? <?php $tests = file("php://stdin", FILE_IGNORE_NEW_LINES); foreach($tests as $test) { for($i = 0; $i <= $test; $i++) { $size = 9283412; $isEven = (($test % 2) …
  • Member Avatar for cereal
    cereal

    Replied To a Post in mod_proxy_html and Apache 2.2.29: parse all <meta http-equiv=“” content=“”>

    > the browser (on the mobile phone) downloads all the video before playing it (doesn't play while buffering), and if the video is really big it's a problem. Ok, I …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to install sdk

    If you're using **composer** then the package must be saved in the **vendor** folder. Run: composer require dropbox/dropbox-sdk 1.1.* This should fix the issue.
  • Member Avatar for cereal
    cereal

    Replied To a Post in mod_proxy_html and Apache 2.2.29: parse all <meta http-equiv=“” content=“”>

    Have you tried to request the video through AJAX? The video link should be a script not a direct access to the file, for example: <?php # remove below comment …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to install sdk

    Hi, have you tried this? > The SDK is contained in the lib/ folder in the zip file so copy lib/ into your project and name it dropbox-sdk/ and include …
  • Member Avatar for cereal
    cereal

    Replied To a Post in mod_proxy_html and Apache 2.2.29: parse all <meta http-equiv=“” content=“”>

    So, the restricted resource is served by your server, correct? I don't see how a meta tag could be processed by the server: the HTML page is the output of …
  • Member Avatar for cereal
    cereal

    Began Watching mod_proxy_html and Apache 2.2.29: parse all <meta http-equiv=“” content=“”>

    I'm using Mamp 3 (pro) on Mac OS X Yosemite 10.10; I'v already compiled and installed mod_proxy_html (3.1.2) and mod_xml2enc, they are both correctly loaded by Apache 2.2.29 without issues. …
  • Member Avatar for cereal
    cereal

    Replied To a Post in mod_proxy_html and Apache 2.2.29: parse all <meta http-equiv=“” content=“”>

    Hi, I'm not sure I've understood what are you trying to do. The `http-equiv` meta: > it is a pragma directive, i.e. information normally given by the web server about …
  • Member Avatar for cereal
    cereal

    Gave Reputation to gentlemedia in Changing style color

    http://codepen.io/concretekiwi/pen/sqtFe
  • Member Avatar for cereal
    cereal

    Replied To a Post in Undefined variable: $conn. php

    Hi, it happens because of the [variable scope](http://php.net/manual/en/language.variables.scope.php), `$conn` is defined outside the function, so or you pass it as parameter, or you set it as global, or you use …
  • Member Avatar for cereal
    cereal

    Replied To a Post in CodeIgniter display problem

    Try to remove the first line in the view page, from the screenshot it seems to be an empty line: there could be a BOM (UTF-8 signature) that can lead …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP fwrite() only writing one row in an array of three rows

    Good, with `fputcsv()` you can do: $list = $sql->fetchAll(PDO::FETCH_ASSOC); $f = fopen('file.txt', 'w'); foreach($list as $line) fputcsv($f, $line); fclose($f); You need `fetchAll()` because you need an array, `fetch()` instead will …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP fwrite() only writing one row in an array of three rows

    Hi, it happens because `fwrite()` is outside the loop and will write the last vallue assigned at `$line`. Use `fputcsv()`: * http://php.net/manual/en/function.fputcsv.php Look at the first example, it does what …
  • Member Avatar for cereal
    cereal

    Replied To a Post in CodeIgniter display problem

    Model name is `BooksModel` (plural), in that method controller you're calling `BookModel`, (singular). Bye ;)
  • Member Avatar for cereal
    cereal

    Replied To a Post in Kill a website remotely

    Oh, a backdoor! :D I'm afraid it's not legal. If the client signed an agreement then, in cases you don't get payment, it's better to talk to a lawyer. If …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Kill a website remotely

    So, all you want is to prevent hotlinks? Why don't you use **.htaccess**? It works without involving Javascript: if the request referer is your domain, then the server will give …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Error in echoing mysql left outer join results

    Hi, it happens because both tables will return the same column name `tableA_id`, since you're fetching as assoc, it will create an array in which the first index will be …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Get facebook profile image from login API

    Hi, can you format code properly? At the moment it's very hard to read. Regarding the user picture, have you tried the `/{user-id}/picture` endpoint? * https://developers.facebook.com/docs/graph-api/reference/user/picture/ * https://developers.facebook.com/docs/graph-api/reference/profile-picture-source/
  • Member Avatar for cereal
    cereal

    Began Watching Catastrophy

    I recently purchased a 200 GB cloud drive from http://mega.nz but now it's wrecked havoc on my local machine. To give you an idea of what happened I'll start by …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Cracking Caesar Cipher

    Hi, I don't understand what it should do your script, tested with a ciphered string and prints only `====`. If you are searching for character frequency, then look at `count_chars()`: …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Post Anomaly

    Cache: probably the new thread was appended to the index cache and was not updated after user's edit.
  • Member Avatar for cereal
    cereal

    Replied To a Post in php - corrupt downloaded file

    Sometimes it happens that the corrupted file will return the server side error instead of the contents, so you end to download a text file with the wrong extension: jpg, …
  • Member Avatar for cereal
    cereal

    Began Watching Facebook Page Reviews API

    Hello Daniweb Community, I'm wanting to incorporate my Facebook pages reviews into my website but I can't see the manage to get a permanent access token. I've tried the same …
  • Member Avatar for cereal
    cereal

    Replied To a Post in what is mysql correct syntax

    > MySQL needs single quotes: P. that should not make difference: * https://dev.mysql.com/doc/refman/5.6/en/string-literals.html or I'm missing something? :) **@blueguy777** if you using mysql_* then try to add `mysql_error()` after the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in SEO Optimized

    > What's the difference between other website and my website? That's all what I need to know. That's the knowledge they are suggesting you to learn. It's not just keywords. …
  • Member Avatar for cereal
    cereal

    Replied To a Post in what is mysql correct syntax

    Hi, you are enclosing the query into single quotes: $a = 'apples'; $b = 'oranges'; So in order to append another variable you have to use the dot operator: $c …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Having issues with mysqli query can any one help

    Ok, that's clear. But, excuse me, I'm a bit lost. At the moment I can only suggest you to try the query from a MySQL client and see if you …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Having issues with mysqli query can any one help

    Sure? So **friends** table is not like this: userid | user_1 | user_2 | status --------------------------------- 1 | user 1 | user 2 | 1 2 | user 1 | …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Having issues with mysqli query can any one help

    Can you show users table? I don't understand which values will assume `uid`, to me it should be an integer, but looking at your code it seems it would be …
  • Member Avatar for cereal
    cereal

    Gave Reputation to gentlemedia in Changing style color

    `[title=colors]` I asume he had to change 'colors' to 'red', 'brown', 'green', etc. But as mentioned by others it's quicker to load the styles if all the color styles are …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Changing style color

    **@gentlemedia** I completely agree with you, for me it's better to work with classes as suggested by you and diafol in previous posts. I went ahead with OP requests to …
  • Member Avatar for cereal
    cereal

    Replied To a Post in what is the problem at my code

    Hi, few questions: * the data is correctly inserted in the database? * if, in view, you do `var_dump($datame);` what you get? * have you tried to remove the error …
  • Member Avatar for cereal
    cereal

    Marked Solved Status for Quotes not displaying in profile/posts page

    Hello, while browsing my posts I saw that sometimes quoted text is not displayed, yet there is an empty space in the corresponding area, I think the quote block is …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Quotes not displaying in profile/posts page

    Now it looks good, not sure it was you or my cache, in any case, thank you for your time Dani! :)
  • Member Avatar for cereal
    cereal

    Replied To a Post in php - error download file from my wamp server

    Or **fileinfo**: $mime = (new finfo(FILEINFO_MIME_TYPE))->file('/path/to/file.ext'); Docs: http://php.net/manual/en/function.finfo-open.php

The End.