What is the difference between BETWEEN and IN operator in SQL?
SQL | difference between BETWEEN and IN operator The BETWEEN operator selects all records between the given range whereas IN operator selects all matching records given with the WHERE clause. BETWEEN operator The Between operator in …
Django migration error : TypeError expected string or bytes-like object
Django I Migrate Error: TypeError expected string or bytes-like object "TypeError: expected string or bytes-like object", says the value we have provided for updating the field for the model is not supported. So to resolve this issue …
What is helpers in CodeIgniter and how to load helper file?
CodeIgniter | What is helpers | Load helper file Helper is simply a collection of function in a particular category which helps you with tasks. The helper file can be loaded in controller constructor, some …
What is the difference between explode() and implode() function?
PHP | implode() and explode() function implode() function is use to convert an array into a string where as explode() function is used to convert an string into an array implode() The implode() function …
Is PHP a case sensitive language?
PHP | Case Sensitive In PHP, keywords (e.g. if, else, while, echo, etc.), classes, functions, and user-defined functions are not case-sensitive but all variable names are case-sensitive. If you defined function name in lowercase, …
Jquery Auto Focus On Next Input Field
Jquery | Auto Focus On Next Input Field The jquery code for autofocus on the next text input field. $(".input-key").keyup(function() { if ($(this).val().length == $(this).attr("maxlength")) { $(this).next('.input-key').focus(); } }); Let's go through the above jquery …
How to make an anchor tag to do nothing?
HTML | Make an anchor tag to do nothing | href="javascript:void(0);" To prevent reloading a page when a link clicked is something like preventing the default behavior of an element. It can be achieved by providing …
What are the difference between mysqli_fetch_assoc and mysqli_fetch_array?
PHP-MYSQL | mysqli_fetch_assoc() VS mysqli_fetch_array() mysqli_fetch_assoc() function fetch a result row as an associative array where as mysqli_fetch_array() function fetch a result row as an associative array, a numeric array, or both. mysqli_fetch_assoc() The mysqli_fetch_assoc() …
Add number of days to a date in php
PHP | Add numbers of days to a date Simple and easy way to add some days in a given date using strtotime() function. <?php $p_date = "2019-01-10"; echo date('Y-m-d', strtotime($p_date . ' + 1 days')); echo …
Django rest framework authentication error “ TypeError: 'type' object is not iterable ”
Django rest framework authentication error “ TypeError: 'type' object is not iterable ” This error comes because "authentication_classes" expecting an iterable(list/tuple) but somehow it is getting something else. So it needs to check a few …
How to stop execution of PHP script ?
PHP | Stop the execution of php script | exit() funtion By using exit() function we can stop the execution of php script. <?php $a = 10; $b = 20; $c = $a+$b; exit(); …
Clear the TINYMCE editor's content using jquery.
JQuery | TinyMCE | Clear TINYMCE editor There is a method called setContent() in TINTMCE which you can use to reset/clear the TINTMCE editor. <script> // if one editor existing in your page. tinyMCE.activeEditor.setContent(''); </script> …
What is the difference between $name and $$name?
$name and $$name both are variables but with a single difference that is $name is just a normal php variable where as $$name is known as reference variable. It allow you to use $name variable's …
How to set timezone in codeigniter?
Codeigniter | Set timezone To set default timezone in Codeigniter, you can add the date_default_timezone_set() function in your application/config.php or index.php file. date_default_timezone_set('your timezone'); <?php // India timezone date_default_timezone_set('Asia/Kolkata'); ?>
How will you concatenate two strings in PHP?
PHP | Combine two strings There are several ways to concatenate two strings in PHP. Use the concatenation operator [.] and [.=] There are two string operators that are used for concatenation. [.]: Concatenation operator …