This file contains hidden or 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 | |
while ($r = mysql_fetch_array($q)) { | |
// open channel header | |
$CN = $r['channel_name']; | |
$xml .= "<channel name='".$CN."'>"; | |
// event details for channel | |
$sql2 = "select * FROM epg where channel_name='".$CN."'"; | |
$q2 = mysql_query($sql2) or die(mysql_error()); |
This file contains hidden or 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
Microsoft Windows [Version 6.1.7601] | |
Copyright (c) 2009 Microsoft Corporation. All rights reserved. | |
D:\xampp\mysql\bin>mysql -u root | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 1 | |
Server version: 5.5.16 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. |
This file contains hidden or 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 | |
function ProcessFifo($code, $quantity, $data) { | |
$result = array(); | |
$counter = $quantity; | |
// proses | |
foreach ($data as $row) { | |
if ($counter > 0) { | |
if ($row['code'] == $code) { | |
if ($row['stock'] >= $counter) { |
This file contains hidden or 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
D:\xampp\mysql\bin>mysql -u root | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 2 | |
Server version: 5.5.16 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. | |
Oracle is a registered trademark of Oracle Corporation and/or its | |
affiliates. Other names may be trademarks of their respective | |
owners. |
This file contains hidden or 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 | |
/* | |
* cURL_Helper: Helper untuk cURL | |
* @param string $url URL yang mau kita buka | |
* @param optional string $spost data yang mau kita POST ke $url | |
* @timeout optional integer waktu sampai timeout | |
*/ | |
function cURL_Helper($url, $spost=FALSE, $timeout=FALSE) | |
{ |
This file contains hidden or 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
Imports System.Data.SqlServerCe | |
Public Class Form1 | |
Private Sub RefreshGrid() | |
MyTableTableAdapter1.ClearBeforeFill = True | |
MyTableTableAdapter1.Fill(DsDatabase11.MyTable) | |
End Sub | |
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load |
This file contains hidden or 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 Class Form1 | |
''' <summary> | |
''' Refresh Grid Data | |
''' </summary> | |
''' <remarks></remarks> | |
Private Sub RefreshGrid() | |
Try | |
' load database ke dataset | |
' data otomatis tampil di semua control yang bind ke DsSample1 |
This file contains hidden or 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
Imports System.Data | |
Imports System.Data.SqlServerCe | |
''' <summary> | |
''' Interface IDataAccess | |
''' </summary> | |
''' <remarks>Untuk keseragaman metode akses data</remarks> | |
Public Interface IDataAccess | |
Function GetData() As DataTable | |
Function Fill(ByRef dt As DataTable) As Integer |
This file contains hidden or 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
-- pemberian nomor baris | |
with t as ( | |
select '081011124' nim, 'IPKU1001' kode_mk, 'Agama' nama_mk, 'D' nilai union all | |
select '081011124' nim, 'IPKU1101' kode_mk, 'Pancasila' nama_mk, 'C' nilai union all | |
select '081011124' nim, 'IPKU2204' kode_mk, 'Pemrograman Java' nama_mk, 'B' nilai union all | |
select '081011124' nim, 'IPKU1101' kode_mk, 'Pancasila' nama_mk, 'B' nilai | |
) | |
select nim, kode_mk, nama_mk, nilai | |
, row_number() over(partition by kode_mk order by nilai) baris | |
from t |
This file contains hidden or 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
CREATE OR REPLACE FUNCTION transkrip(CHAR) | |
RETURNS TABLE(nim CHAR, kode_mk CHAR, nama_mk CHAR, nilai CHAR) AS | |
$$ | |
BEGIN | |
RETURN QUERY | |
SELECT tmp1.nim, tmp1.kode_mk, tmp1.nama_mk, tmp1.nilai | |
FROM ( | |
SELECT A.nim, A.kode_mk, B.nama_mk, A.nilai | |
, row_number() over(partition by A.kode_mk order by A.nilai) baris |