Focused on Web Development, ReactJS, Angular, JavaScript, PHP, Database Design, Ionic, Jquery and MySQL
Tuesday, 11 April 2017
ui slider price range in mobile not working
Just add the script after jQuery ui:
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
Saturday, 8 April 2017
Export MySQL data to Excel in PHP
public function actionExportpropertyexcel()
{
$Property = YOUR_SQL_QUERY
$filename = 'HEMANT - '.date('Y-m-d h:i:s').' - List.xls';
//header("Content-type: application/vnd-ms-excel");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".$filename);
echo '<table width="100%" border="1">
<thead>
<tr>
<th>Property id</th>
<th>Property Type</th>
<th>Property Name</th>
<th>Address</th>
<th>Pincode</th>
<th>City</th>
<th>State</th>
<th>Country</th>
<th>Added By</th>
<th>Status</th>
<th>Created On</th>
</tr>
</thead>';
foreach($Property as $prop)
{
echo '
<tr>
<td>'.$prop->id.'</td>
<td>'.$prop->property_type.'</td>
<td>'.$prop->detail->property_name.'</td>
<td>'.$prop->locality.'</td>
<td>'.$prop->pincode.'</td>
<td>'.$prop->city.'</td>
<td>'.$prop->state.'</td>
<td>'.$prop->country.'</td>
<td>'.$prop->property_owner_detail->detail->name.'</td>
<td>'.$prop->status.'</td>
<td>'.$prop->created_at.'</td>
</tr>
';
}
echo '</table>';
}
{
$Property = YOUR_SQL_QUERY
$filename = 'HEMANT - '.date('Y-m-d h:i:s').' - List.xls';
//header("Content-type: application/vnd-ms-excel");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=".$filename);
echo '<table width="100%" border="1">
<thead>
<tr>
<th>Property id</th>
<th>Property Type</th>
<th>Property Name</th>
<th>Address</th>
<th>Pincode</th>
<th>City</th>
<th>State</th>
<th>Country</th>
<th>Added By</th>
<th>Status</th>
<th>Created On</th>
</tr>
</thead>';
foreach($Property as $prop)
{
echo '
<tr>
<td>'.$prop->id.'</td>
<td>'.$prop->property_type.'</td>
<td>'.$prop->detail->property_name.'</td>
<td>'.$prop->locality.'</td>
<td>'.$prop->pincode.'</td>
<td>'.$prop->city.'</td>
<td>'.$prop->state.'</td>
<td>'.$prop->country.'</td>
<td>'.$prop->property_owner_detail->detail->name.'</td>
<td>'.$prop->status.'</td>
<td>'.$prop->created_at.'</td>
</tr>
';
}
echo '</table>';
}
Subscribe to:
Posts (Atom)