This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// sumber - http://www.foscode.com/json-array-single-mysql-insert-update/ | |
//First decode the array | |
$arr = file_get_contents('sql_json.php'); | |
$decarr = json_decode($arr, true); | |
//echo '<pre>$decarr->'; print_r($decarr) . '</pre>'; | |
$count = count($decarr['rows']); | |
$values = array(); // This will hold our array values so we do one single insert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Katakan data berbentuk seperti ini | |
F0003=26031966 | |
F0004=1012010 | |
F0005=31122010 | |
F0003, F0004, F0005 adalah nama medan | |
cadangnya nak pecahkan jadi seperti ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Ini fail fungsi.php | |
* Dalam ini ada fungsi untuk cari imej dalam folder dan subfolder | |
*/ | |
function cari_imej($namaFail,$strDir) | |
{ | |
//require_once ('public/skrip/listfiles2/dir_functions.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
//anggap $bulan adalah array seperti ini | |
$bulan = array('rangka', | |
'jan', 'feb', 'mac', 'apr', | |
'mei', 'jun', 'jul', 'ogo', | |
'sep', 'okt', 'nov', 'dis'); | |
*/ | |
class Bandingan_Tanya extend Tanya |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'connect.php'; | |
include 'header.php'; | |
// mula2 buat sql dan masuk dalam tatasusunan dahulu | |
$sql = "SELECT | |
topik_id, | |
topik_subjek | |
FROM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['jquery', 'underscore', 'backbone', 'text!templates/category/categoryIndexTemplate.html'], function($, _, Backbone, categoryIndexTemplate) { | |
var CategoryModel = Backbone.Model.extend({}); | |
var CategoryCollection = Backbone.Collection.extend({ | |
model: CategoryModel, | |
url: "https://izify.com/api/izify-api/admin/get_all_categories.php?merchantId=" + localStorage.merchantId, | |
parse: function(data) { | |
// Return people object which is the array from response | |
return data.tbl_category; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Let's chat in Telegram http://telegram.org/dl1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function bulanan($jadual = 'jan13') | |
{ | |
// set pembolehubah untuk mengumpul respon yang wujud dalam $myTable | |
$respon = $this->tanya->kumpul_respon($myTable = 'mdt_rangka13', | |
$myJoin = 'f2', $medan = 'respon', $jum = null); | |
# semak pembolehubah $respon | |
//echo '<pre>', print_r($respon, 1) . '</pre><br>'; | |
$r = 'c.respon'; $kumpul = null; $jumlah_kumpul = null; | |
// mula papar semua dalam $myTable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// tukar jadi data json dari main website | |
############################################## | |
include "db_buka.php";// buka pangkalan data # | |
############################################## | |
$mysqli = new mysqli($myServer, $myUser, $myPass, $myDB); | |
$myArray = array(); | |
if ($result = $mysqli->query('SELECT `id`, `bahagian`, `nama`, `link`, `target` FROM link')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$img = imagecreatetruecolor(200, 200); | |
// allocate some colors | |
$white = imagecolorallocate($img, 255, 255, 255); | |
$red = imagecolorallocate($img, 255, 0, 0); | |
$green = imagecolorallocate($img, 0, 255, 0); | |
$blue = imagecolorallocate($img, 0, 0, 255); | |
$blue1 = imagecolorallocate($img, 102, 104, 230); |
OlderNewer