• Member Avatar for cereal
    cereal

    Replied To a Post in D3 bar chart missing bars

    Hello, the *Unexpected value translate(NaN,0)* problem seems to be generated by the `range` value: {"range":"0 - 5","percentage":12,"qty":1326} which is used to set the `x` attribute of the `rect` tag: <g …
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in Colour Conversion Class

    ## Background ## Hi All, I 've been playing around with colour (color!) formats and needed to create a class for converting different formats, so I thought I'd share it. …
  • Member Avatar for cereal
    cereal

    Replied To a Post in select button

    Hi, You can use the `required` attribute: <form method="post" action=""> <label for="fruits">Choose an option:</label> <select name="fruits" required> <option value="">------</option> <option value="fujiapple">Apple</option> <option value="vanillaorange">Orange</option> <option value="pandoracherry">Cherries</option> </select> <input type="submit" name="submit" value="submit" …
  • Member Avatar for cereal
    cereal

    Replied To a Post in dropdown.js (Bootstrap 2) max height?

    Hello, try with: .dropdown-menu { max-height: 450px; overflow-y: auto; overflow-x: hidden; } Source: * https://github.com/twbs/bootstrap/issues/1989
  • Member Avatar for cereal
    cereal

    Began Watching Room Availability check with date range

    Hi All, These days I am implimenting a Hotel Room Reservation system. I have a small problem in Check Availability' page. below I listed my database structure. *rooms* rid int(11) …
  • Member Avatar for cereal
    cereal

    Began Watching How to troubleshoot mobile device website rendering?

    [www.unitedinblue.com](http://www.unitedinblue.com) There's a lot of JS and ajax and extra scripts and things (far as I can tell at a first look) on this website, some of which don't even …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Change Maker / JavaScript

    Hello, I think the problem is in the `cents` variable, this is modified after each IF statement, but doing: cents = cents%0.25; Will return `0.065` which means `0`, so the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Zend 1 - setting database charset to utf8 in application.ini

    Sorry for the update, I just noticed that you are using ZF1, the situation is similar, but the code is different and it refers to MySQL, check lines `83` and …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Constant Contact links relation to server errors

    Regarding the 500 error, check the error log of your server, an external redirect cannot generate an error like that, unless your server config is accepting some headers set from …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Zend 1 - setting database charset to utf8 in application.ini

    The reason is probably given by their PDO library, check lines `266`, `320` and `323`: * https://github.com/zendframework/zf2/blob/a1085b769953be15296c3a4976e026927b5b9584/library/Zend/Db/Adapter/Driver/Pdo/Connection.php#L266 The `$options`, created by the `resources.db.params.driver_options.1002` variable is used as 4th argument in …
  • Member Avatar for cereal
    cereal

    Replied To a Post in in mysql insert array values in one column

    > here it showing all city values but i need to show state related. To solve this just change the query at line 28: $state_id = $s['state_id']; $result = mysql_query("select …
  • Member Avatar for cereal
    cereal

    Replied To a Post in in mysql insert array values in one column

    Ok, there are few problems in the above code. The first problem is given by this line: $ids = array($city_id); Even if `$city_id` is a comma separated list, for MySQL …
  • Member Avatar for cereal
    cereal

    Replied To a Post in in mysql insert array values in one column

    Ok, but what is the condition to sign the checkboxes? A match between `$_GET['place']` and `city_id`?
  • Member Avatar for cereal
    cereal

    Replied To a Post in in mysql insert array values in one column

    Hello, note that you are already overwriting the `$ids` variable on line 18: echo $ids = implode(',', $ids); So, when you try to perform the same action on line 19, …
  • Member Avatar for cereal
    cereal

    Stopped Watching Random Facts

    I'm hoping that people will post unusual or little known facts here. It would be proper to include a link to a source for confirmation. Here's a start. Speedy Gonzales …
  • Member Avatar for cereal
    cereal

    Began Watching The best and most useful standalone language

    I am new to programming and I am looking for a language that is easy to learn, and a relatively useful programming language. I don't know much about programming but …
  • Member Avatar for cereal
    cereal

    Replied To a Post in htaccess xml file downlaods

    Since in `.htaccess` the rules have a cascading order, for a simple "manual" solution you could save this .htaccess file into the download directory: <Files "*"> order allow,deny deny from …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to get count of two values from a single table

    **@faisal** I get both rows, probably you see them on the same line, try to add a separator, for example `<br />`: while ($rows = mysql_fetch_array($sql_count)) { echo $rows['approved'] . …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to get count of two values from a single table

    Use `group by` and count, for example: select count(approved) from pma where approved in(0,1) group by approved; live: http://sqlfiddle.com/#!2/f52df/1
  • Member Avatar for cereal
    cereal

    Replied To a Post in php and stripe

    You can use their **test mode**: * https://stripe.com/docs/testing bye!
  • Member Avatar for cereal
    cereal

    Replied To a Post in Mysql(db design) - storing invoices that starts from 1 each financial year

    If the invoice numbering goes, for example, from 2009/04/01 to 2010/03/31 then the column year should take both years or the full date string, something like: 2009-2010 Or: 20090401-20100331 Then …
  • Member Avatar for cereal
    cereal

    Began Watching Random Facts

    I'm hoping that people will post unusual or little known facts here. It would be proper to include a link to a source for confirmation. Here's a start. Speedy Gonzales …
  • Member Avatar for cereal
    cereal

    Replied To a Post in MySQL: Get current time with milliseconds

    In addition, you could try with a UDF. For example: * http://www.xaprb.com/blog/2007/10/30/how-i-built-the-now_usec-udf-for-mysql/ * http://stackoverflow.com/a/8986802 But if you want to save it, you have to use `varchar` instead of a `datetime` …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Create a PHP table

    Hello, you probably want something like this: <?php $temps = range(0, 100); ?> <table> <thead> <tr> <th>Fahrenheit</th> <th>Celsius</th> </tr> </thead> <tbody> <?php if(count($temps) > 0) { foreach($temps as $F) { …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Error php pdo select Command

    Hi, the `prepare()` method requires `execute()` not `query()`, so this: $sql = "SELECT * FROM user_right WHERE login_id = '$username' and password = '$password'"; $stmt = $dbh->prepare($sql); $stmt->setFetchMode(PDO::FETCH_ASSOC); if($stmt = …
  • Member Avatar for cereal
    cereal

    Replied To a Post in compile windows source code(c) under linux

    Hello, have you followed the suggestions you have received in your precedent request? http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/474312/compile-windwos-netcat-under-linux If yes, then give us more information about your issue.
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to redirect from one controller file into another in codeigniter

    Hi, is the URL helper automatically loaded? By enabling the log in CI you should be able to get more information about the error, just check into `application/logs/`. Try also …
  • Member Avatar for cereal
    cereal

    Replied To a Post in codeigniter sessions

    You can check the session in the constructor method, for example: class Test extends CI_Controller { public function __construct() { parent::__construct(); # Check the session if($this->session->userdata('is_valid') !== TRUE) { # …
  • Member Avatar for cereal
    cereal

    Replied To a Post in SQL Syntax

    Moving the .sql files is the easiest method. But if you encounter such problems there's must be something that interferes with your action. **Have you checked the error log of …
  • Member Avatar for cereal
    cereal

    Replied To a Post in SQL Syntax

    The problem seems to be the same of the previous, but it targets a different table. If so it does not seem to be a syntax error. Can you explain …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Blue or red ?

    Hi, you could also use a regular expression, for example: if(/^rgb\(0,\s*0,\s*255\)$/i.test(document.getElementById(id).style.backgroundColor)) Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
  • Member Avatar for cereal
    cereal

    Replied To a Post in SQL Syntax

    Hi, I understand the table does not exists, I was suggesting to drop it anyway to force the system to delete the data file, or at least to see if …
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in Linked Dropdowns (Select Fields) for Static-ish Data

    Hello All. Been playing around with some linked dropdowns. It seems to be a recurring theme here on DW, so I thought I'd offer this up as a possible solution …
  • Member Avatar for cereal
    cereal

    Replied To a Post in SQL Syntax

    Hi, drop the table and retry. If it does not work check the status: show engine innodb status\G And verify if there are errors, you could also perform `check table …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP can't print html tags

    Regarding the queries use prepared statements, so consider to switch from the MySQL API to PDO or MySQLi: * http://php.net/pdo.prepared-statements * http://php.net/manual/en/mysqli.quickstart.prepared-statements.php About the APIs: * https://php.net/manual/en/mysqlinfo.api.choosing.php Then change username …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Applied indexes and analyze, still got slow query

    Hi, show your query, the table structure and the output of `explain` over the query. Otherwise it is difficult to give correct suggestions.
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP can't print html tags

    Ok, now I see: the page is not complete. If you check the headers you will see that the server returns status code `500`: HTTP/1.1 500 Internal Server Error Connection: …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Domain specific logo

    Sorry I missed your reply. So, the rewrite is ignored because it is conflicting with the previouses rules. You can try to move them to the top of the block …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP can't print html tags

    Did you solved the problem? Looking at the linked page, it seems all fine now. An evident error, in the above code is this: $q="select count(*) \"total\" from comments"; Because …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Posting data på databse

    > But the problem now is. I get the error message: 'Unable to select table.'? You get that because of: or die( "<p><span style=\"color: red;\">Unable to select table</span></p>"); To get …
  • Member Avatar for cereal
    cereal

    Replied To a Post in DATE FORMAT

    If you're referring to the datepicker then yes, use `dateFormat`: $("#datepicker").datepicker({ dateFormat: 'dd-mm-yy' }); Documentation: * http://api.jqueryui.com/datepicker/#option-dateFormat * http://api.jqueryui.com/datepicker/#utility-formatDate
  • Member Avatar for cereal
    cereal

    Replied To a Post in Posting data på databse

    And if you add `or die(mysql_error())` to `mysql_query()` do you receive an error? mysql_query("INSERT INTO festivals (name, logo, country, city, deadline, date_from, place, id, date_to, info, web, about, open_for, flag) …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Posting data på databse

    Hi, can you show us your code? Otherwise it not simple to help.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Link a Title

    Hehe don't worry, it happens to do a mistake! :)
  • Member Avatar for cereal
    cereal

    Replied To a Post in IFNULL() not working

    > This is working, but the problem is sometimes it return an empty array It can happen if the range in the `WHERE` statement is not matched, but MySQL does …
  • Member Avatar for cereal
    cereal

    Replied To a Post in IFNULL() not working

    Hi, in this case `IFNULL()` is not useful, because `count()` will return `0` in case the value you submit is NULL, and `1` if you submit a string or a …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Understanding code

    That is a user defined function, check within the included files. For example check in **wds.php**, as you see the header.inc.php file is included after wds.php.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Understanding code

    Check the **.htaccess** file, there is probably a rewrite to match the switch cases in **header.inc.php**. Also check the code of the `getCurrentFilename()` function, that should give some hints about …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Domain specific logo

    I see you are redirecting both now: * http://fmscopk.com/skin/frontend/default/f001/images/logo.png * http://mianbros.com/skin/frontend/default/f001/images/logo.png If you do not want these redirects and if you can access the **server config** or the **virtual host** …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Domain specific logo

    Hi, if you're using Apache and you can use the **.htaccess** file, then you can apply these rules: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^site1.tld RewriteCond %{REQUEST_URI} logo.png …

The End.