Latest Post


How to import CSV file using mysql

In this post we have learn how to import CSV file using LOAD DATA INFILE statement. this is a very simple example for a import file to the database. Here we have provide a full sysntax for LOAD DATA INFILE statement. <strong>Sysntax</strong> <pre class="language-mysql"> LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name' [REPLACE | IGNORE] INTO TABLE tbl_name [CHARACTER SET charset_name] [{FIELDS | COLUMNS} [TERMINATED BY 'string'] [[OPTIONALLY] ENCLOSED BY 'char'] [ESCAPED BY 'char'] ] [LINES [STARTING BY 'string'] .....

By Hardik Savani | March 3, 2016 | | 2651 Viewer | Category : MySql
READ MORE

Laravel 5 create Custom Validation Rule example.

Custom Validation Rule is very usefull and interesting concept of laravel 5 because custom validation throught we can re-use validation and use it easily by just name as like laravel core validation(required,same,in etc.). So, In this post i am going to show you how to create custom validation rules in laravel 5.2. you can create very simple way and use too. you can create custom validation rules by few following step and you can see preview of example that give for add custom validation rule. In this example you are creating <strong class="path">is_odd_string</strong> custom validation rule. .....

By Hardik Savani | March 3, 2016 | | 67386 Viewer | Category : PHP Laravel
READ MORE

How to get maximum key value of array in PHP?

Sometimes, you need to get maximum key value of your array but you try to get with loop and any function etc, but in bellow example you can see we can get biggest key value from our php array by using max() and array_keys(). So, let's try to use in your code this way: <strong>Example:</strong> <pre class="language-php"> $myArray = ['2'=>'Hey','4'=>'Hello','1'=>'Hi','3'=>'GH']; $new_key = max(array_keys($myArray)); $new_val = $myArray[$new_key]; print_r($new_val); </pre>

By Hardik Savani | March 2, 2016 | | 1364 Viewer | Category : PHP
READ MORE

Example of unionAll in Query Builder Laravel 5

Sometimes you need to bind multimple query then you can use unionAll in laravel. If you use union all then laravel query builder provide unionAll method for mysql union. when you are doing big project or ERP level project then mostly you require to use union for getting data from database with multiple table. In Following example you can see how to use union all in Laravel 5. <strong>Example:</strong> <pre class="language-php"> $silver = DB::table("product_silver") ->select("product_silver.name" ,"product_silver.price" ,"product_silver.quantity"); $gold = DB::table("product_g.....

By Hardik Savani | March 2, 2016 | | 6818 Viewer | Category : PHP Laravel
READ MORE

Laravel 5 Join with subquery in Query Builder Example

In this post i want to show you how to use subquery with join in laravel query builder. Whenever you need to use subquery in your laravel project you can use following example and learn hot to use subquery. In bellow example you can see we add subquery using DB::raw(), DB::raw() throught we can select our subtable and after in second argument i added compare your field. That way you can easily fire subquery with laravel 5.2 query builder. <strong>Example:</strong> <pre class="language-sql"> $data = DB::table("items") ->select("items.*","items_count.price_group","items_count.quantity_group") .....

By Hardik Savani | March 2, 2016 | | 40289 Viewer | Category : PHP Laravel
READ MORE


mysqld.sock XSS voyager package PayPal Protection Input Zip Lightbox Form Jquery Foreign Key datatables Animation Bootstrap maxlength plugin Ckeditor Remember me Vue.JS Strip Tags Connection Magento 2 Image Gallery Reset Package 500 error page REST node.js Twitter OAuth PingPong strtolower lowercase Accordion glob Ionic Form Validation Scout Package characters Old Multiple PHPExcel Email Environment is_null screenshotmachine.com API filter Failed inner join clipboard.js Paypal Payment Gateway ajaxComplete CloudConvert API Confirm Box Parsley Manual maatwebsite Bootstrap Notify Plugin Plugins Gravatar Image Laravel 5.4 Repository Pattern Trans Helper softDeletes Excel Data Validation Database Seeder parse array_combine Sub-Domain Trigger Object croppie.js Modal Laravel Factory Remove Moment JS FILTER_VALIDATE_URL Highlight JS Google OAuth Request Method bootstrap tagsinput CURL Page Repo guzzle http client Barcode Contact US Form Apache Laravel Cashier Access Null Allow Bootstrap-lightbox Plugin CRUD Specific Scroll X-editable Plugin phpmyadmin Draggable Dialog box FIND_IN_SET() Class Autocomplete away() React JS Script Bootstrap Plugin Highchart User Agent mCustomScrollbar Plugin popupMultiSelect plugin Version SweetAlert Plugin upload_max_filesize Elasticsearch SUM() Snippet Location helper Setup MySQL Subquery Login With FB Number Blade inject Delete uppercase file_exists Opencart Route Typeahead JS Value auth() Controller Sort Blocked date_format() Bootstrap Confirmation js plugin bootstrap-multiselect plugin Generate Mail MySql Pull SUBSTRING_INDEX() Google Chart Control Recursive ANDROID_HOME SEO ID Resize Image Laravel apache2