-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 3 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 3 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
cyber_heckerOffline
Location: Ponti Hot City
Post subject: Ask: Deklarasi Variabel Pada MySQL ?  PostPosted: 07/Aug/2005 00:37
onProfessional


Joined: 19-May-2005
Posts: 981
Location: Ponti Hot City
Status: Offline
alo para senior-senior yang baik hati Embarassed @[muji dulu, karena ada maunya] kekekeke Razz
gue baru belajar mySQL neh, jadi masih awam dan sama sekali buta tentang mySQL. jadi gue mo nanya :

gimana cara mendeklarasikan variabel pada mySQL ?

kalo di ms SQL Server kan ada perintah
DECLARE @VARIABEL TYPE
SET @VARIABEL = 'DATA'
nah kalo di mySQL gimana ?

_________________
 
 View user's profile Send private message Yahoo Messenger MSN Messenger  
Reply with quote Back to top
imunkOffline
Location:
Post subject:   PostPosted: 04/Dec/2005 11:01
onUber-Skilled


Joined: 28-Mar-2005
Posts: 451

Status: Offline
deklarasi disini buat apa?? deklarasi dari tabel yg sdh ada atau yg baru..??
 
 View user's profile Send private message  
Reply with quote Back to top
cyber_heckerOffline
Location: Ponti Hot City
Post subject:   PostPosted: 04/Dec/2005 17:05
onProfessional


Joined: 19-May-2005
Posts: 981
Location: Ponti Hot City
Status: Offline
deklarasi variabel yang bisa digunakan di parameter query. contoh kita bikin query yang menggunakan parameter yang sama tapi untuk banyak query yang berbeda :

SELECT * FROM TrJual WHERE Tanggal < '2005-01-01'
UNION
SELECT * FROM TrRetur WHERE Tanggal < '2005-01-01'
dst.. dst..

daripada boros kan lebih baik pake variable contoh :
SET @TANGGAL = '2005-01-01'
SELECT * FROM TrJual WHERE Tanggal < @TANGGAL
UNION
SELECT * FROM TrRetur WHERE Tanggal < @TANGGAL

_________________
 
 View user's profile Send private message Yahoo Messenger MSN Messenger  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 05/Dec/2005 07:09
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
cyber_hecker, sama aja kok.
bisa langsung:

SET @variabel = isivariabel

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
imunkOffline
Location:
Post subject:   PostPosted: 05/Dec/2005 14:18
onUber-Skilled


Joined: 28-Mar-2005
Posts: 451

Status: Offline
@luridarmawan
      Quote:

SET @TANGGAL = '2005-01-01'
SELECT * FROM TrJual WHERE Tanggal < @TANGGAL
UNION
SELECT * FROM TrRetur WHERE Tanggal < @TANGGAL


error mas..... Crying or Very sad

saya coba tambahkan titik koma spt berikut

      Quote:

SET @TANGGAL = '2005-01-01';
SELECT * FROM TrJual WHERE Tanggal < @TANGGAL
UNION
SELECT * FROM TrRetur WHERE Tanggal < @TANGGAL


result is empty....
padahal di database sudah ada mas, kalo salah syntax salahnya dimana ya...??? Very Happy

oh iya mas luri user dan password masuk ke "gudang.delphi-id.org"
apa ya, aku pake user=pubftpd dan password=pubftpd.
ko gak bisa masuk.....
 
 View user's profile Send private message  
Reply with quote Back to top
saysansay
Location:
Post subject:   PostPosted: 05/Dec/2005 15:43
onProfessional


Joined: 06-Aug-2005
Posts: 648

Waleh..waleh..udah tua banget akangku yg satu ini....user pubftpd paswword pubpub.....wakaakakakakakakaak baru umur 23 taon aja udah lupanya segitu pasti diajak kang cy ber guling2an trus ya....wakakaakakakaka

_________________
== Barudak Jambi ===
Company : http://www.mpiholding.com/
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 05/Dec/2005 20:12
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
diriku ga tau salahnya dikau dimana,
tapi sepertinya dikau memang orang bersalah dehh...
xixixiix...

ini saya buat 2 tabel trjual dan trretur




hasil dari query:
      Code:

set @tanggal = '2005-12-02';
select * from trjual where tanggal < @tanggal
union
select * from trretur where tanggal < @tanggal


skrinsot-nya:

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
cyber_heckerOffline
Location: Ponti Hot City
Post subject:   PostPosted: 06/Dec/2005 00:29
onProfessional


Joined: 19-May-2005
Posts: 981
Location: Ponti Hot City
Status: Offline
OOT: woloh.. adminnya pelit neh.. mosok gambarnya kecil kayak gitu.. kekekeke.... takut program bajakannya ketahuan pow Twisted Evil

_________________
 
 View user's profile Send private message Yahoo Messenger MSN Messenger  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 06/Dec/2005 06:08
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
kecil = hemat space
kasian yang pake jalur bw terbatas.

program mysqlfront yg dipake masih freeware, bukan [****].
sekedar memulai membiasakan diri untuk tidak menggunakan bajakan2 lagi.

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
imunkOffline
Location:
Post subject:   PostPosted: 07/Dec/2005 09:58
onUber-Skilled


Joined: 28-Mar-2005
Posts: 451

Status: Offline
kucoba lagi ternyata tetep gak jalan mas luri.
aku pake mysql 4.1.2, mas luri pake mysql veris berapa??
terus tipe data di tabelku adalah "date" mas, kalo mas luri kayaknya "datetime" deh tipenya... Smile
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 07/Dec/2005 13:19
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
sudah tak ganti dengan tipe date, no problem

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
kaka-delphi
Location: Taziex
Post subject:   PostPosted: 07/Dec/2005 22:55
onElite


Joined: 12-Oct-2005
Posts: 1050
Location: Taziex
Ketawa mas ulil lucu xixiixixixixiixixi ...............

Apa MySQL versi 4.0.xx udah bisa support kayak gituan ? maksud gituan tuch kayak deklarasi variable, store proc, transaction ........
Mohon info nya jugha Smile
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 08/Dec/2005 03:43
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
mysql 4.0.xx:
variable Ok
store-proc No

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
donald
Location: Tongas - Probolinggo
Post subject:   PostPosted: 01/Jul/2007 13:38
onSkilled


Joined: 08-Jun-2007
Posts: 114
Location: Tongas - Probolinggo
kang luri kalo buat varibel pada mysql 5 caranya sama?
terus saya pengen tanya tentang storeprocedure dan triger nih pada mysql 5, hehehhehehheheheh
maklum kang masih cupu

_________________
Apa yang di pikirkan itu adalah do'a
Apa yang di ucapkan itu adalah do'a
Pikirkan dan ucapkan yang baik-baik
 
 View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger  
Reply with quote Back to top
mbahdienOffline
Location: Semarang
Post subject:   PostPosted: 06/Oct/2009 16:20
onIntermediate


Joined: 16-Apr-2007
Posts: 54
Location: Semarang
Status: Offline
Lama nggak ketemu nih, tampilan delphi-id beda. Mo ikut nimbrung aja, nih aku kasih contoh stored procedure:

      Quote:
CREATE PROCEDURE `sp_postedkaskecil`(IN tanggal DATE, IN nogudang INTEGER)
NOT DETERMINISTIC
SQL SECURITY DEFINER
COMMENT ''
begin

declare fidcompany,fidgudang,fidcoadebet,fidcoacredit,fidcashbookmin int;
declare fdebet,fcredit double(15,0);
declare ckaskeciljurnal cursor for
select idcompany,idgudang,idcash_book_min,debet,credit,idcoa_debet,idcoa_credit from
cash_book_min where idgudang=nogudang and
tgl=tanggal and is_posted=1;

declare exit handler for not found begin end;
open ckaskeciljurnal;
loop
fetch ckaskeciljurnal into fidcompany,
fidgudang,fidcashbookmin,fdebet,fcredit,fidcoadebet,fidcoacredit;
begin
declare fkodecompany varchar(125);
declare fidjurnal,fidjurnalno,nocompany int;
declare fjurnalno varchar(255);
select idcompany into nocompany from gudang where
idgudang=nogudang;
select kode into fkodecompany from
master_company where idcompany=nocompany;
select concat('JU','-',fkodecompany,'-',lpad(
ifnull(max(idjurnal_no),0)+1,7,'0000000'),'-',date_format(tanggal,'%y')),
ifnull(max(idjurnal_no),0)+1
into FJurnalno,fidjurnalno from coa_jurnal where ti=year(tanggal) and idcompany=nocompany;
select ifnull(max(idcoa_jurnal),0)+1 into fidjurnal from coa_jurnal;
insert into coa_jurnal(idcoa_jurnal,
tgl,idjurnal_no,ti,
idcompany,jurnal_no) values(
fidjurnal,tanggal,fidjurnalno,
year(tanggal),
nocompany,fjurnalno);

begin
insert into coa_jurnal_det(idcoa_jurnal,idcompany,idcoa,
debet,credit,iddokumen,idjns) values(fidjurnal,
fidcompany,
fidcoadebet,fdebet,0,fidcashbookmin,11);
insert into coa_jurnal_det(idcoa_jurnal,idcompany,idcoa,
debet,credit,iddokumen,idjns) values(fidjurnal,
fidcompany,
fidcoacredit,0,fcredit,fidcashbookmin,11);






end;

end;
end loop;



end;

Puyeng bacanya ya? Saya sendiri yang buat ikut puyeng.

Itu adalah contoh stored procedure yang ada looping cursornya. Moga bisa dipelajari.

_________________
Rumah saya dari Mrican belok kanan.
Kontak:(024)70332916, 08157761318
http://delphirewo.blogspot.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |