PHP Send Mail with Attached File






$filename_localfile="myfile.csv";
$mailContent="My content";
$mail_boundary = md5(uniqid(time()));
$mailSubject="My subject will appear on mail title";

$mail_headers .= "MIME-Version: 1.0\r\n";
$mail_headers .= "Content-type: multipart/mixed;boundary=\"$mail_boundary \"";
$mail_headers .= "\r\n\r\n";
$mail_headers .= "This is a multi-part message in MIME format.";
$mail_headers .= "From:soly K <mymail@gmail.com>\r\n";

$mail_headers .= "\r\n\r\n";
$fp = fopen($filename_localfile, "r");
$file = fread($fp, filesize($filename_localfile));

$file = chunk_split(base64_encode($file));

$mail_body = "--$mail_boundary\n";
$mail_body .= "Content-type: text/plain; charset=euc-kr\r\n";
$mail_body .= "Content-transfer-encoding: 8bit\r\n\r\n";
$mail_body .= $mailContent."\r\n";
$mail_body .= "--$mail_boundary\r\n";
$filename = basename($filename_localfile);

$mail_body .= "Content-type: application/msword; name=$filename\r\n";
$mail_body .= "Content-transfer-encoding:base64\r\n\r\n";
$mail_body .= $file. "\r\n\r\n";

$mail_body .= " --$mail_boundary--";

mail("tomailsomeone@gmail.com",$mailSubject, $mail_body, $mail_headers);

Import Data from Excel to Create Dashboard on QlikView - 2


Import Data from Excel for create dashboard in QlikView





You can import data from excel to QlikView on dashboard and I can say that it's such a very simple, However this way it was not flexible for user to flush data to keep present every time but it's simple way to create dashboard for short terms.

OKEY!
Let's see my VDO
https://youtu.be/iamSi7H_AO0



Create Table Data for Dashboard by QlikView - 1

How to use QlikView in the first time to create simple dashboard?



HELLO!
How are you? How is your life there? How is the weather? in Thailand it's very so hot, that can melt me, however I hope you enjoin life for this summer time.

For this season I would present you how to create table data on dashboard by QlikView (If you do not know about QlikView you can click on this link http://www.mymemoboxs.com/2015/04/what-is-qlikview-product.html)

And for good news, I have recorded VDO how to for all of you too, but for the sound that so sorry, You have to imagine how is your voice look like ^__^

OKEY! Enjoin VDO
https://youtu.be/4JQ9q9oQy2M


SQL Server Create Table


How to create table in SQL Server that very simple for the beginner.




Note!
Please do not create the 
same  name of Table in View Module of SQL Server Database

CREATE TABLE [dbo].[DATABASE_TABLE1](
[T_YEAR] [varchar](50) NULL,
[T_MONTH] [varchar](50) NULL,
[T_ACCOUNT] [varchar](50) NULL,
[T_NAME] [varchar](50) NULL,
[T_LASTNAME] [varchar](50) NULL,
[T_SALARY] [decimal](18, 2) NULL
) ON [PRIMARY]

Create command as details as above then click on "Execute"
or You can follow methods as image below

STEP-1Create command to create table





STEP-2After click on "Execute" then click right on database for refresh, you will see the table have created




STEP-3Click right at table then select design menu



STEP-4
You will see the structure of table as image below



STEP-5
Set Primary Key by click right on that field



Primary Key have created


SQL Select change column to row

How to change column from table to row?




Example data from table1

id name lastname month1 month2 month3
1 name1 lastname1 300 400 500
2 name2 lastname2 10 20 30


Code :

SELECT id,name,lastname,amount,month
FROM (
SELECT id,name,lastname, month1 as amount, '1' as month FROM table1 as t1
UNION ALL
SELECT id,name,lastname,month2 as amount, '2' as month FROM table1 as t2
UNION ALL
SELECT id,name,lastname,month3 as amount, '3' as month FROM table1 as t3
)


Result :
id name lastname amount month
1 name1 lastname1 300 1
1 name1 lastname1 400 2
1 name1 lastname1 500 3
2 name2 lastname2 10 1
2 name2 lastname2 20 2
2 name2 lastname2 30 3

What is QlikView Product?

What is QlikView? Is it good for Business Intelligence?




I fail in love with QlikView immediately after I have tried to used it for the first time, If you are a developer of BI tools, You may know or do not know about this product, but let's me tell you some thing how is QlikView cool?

WHAT IS IT?
QlinkView is the one product (from Sweden) to create Business Intelligent concept to generate report, the dimension of report that you want to see and process, in basically of general report you will see only 2 dimension of data but if you use BI concept, you can answer and question of your boss when he/her would like to know some information of data in different view in 2 minutes.

HOW IS GOOD in QlikView ?
- Very simple and easy to create report
- Support every database type by use connecting driver
- Fast and Smooth
- Write in memory concept that why it make QlikView process report very fast
- You can create What's if as you want
- Available import google map to create bubble

You can download and use it by link before, it's free and can use any feature like license product but the different thing is you can not run report in any other computer, except the computer you have installed QlinkView
http://www.qlik.com/

Jquery DatePicker Show Full Month Name and Year





Result




Jquery Code


$("#dateStart").datepicker({

changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function(dateText, inst)
{
    var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
    var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
    $(this).datepicker('setDate', new Date(year, month, 1));
}

});