Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-05-2007, 10:37 AM
Novice Webmaster
 
Join Date: Apr 2007
Location: kuantan
Posts: 21
Rep Power: 0
beih107 is on a distinguished road
sape tau??

macam mana nak buat sesuatu data tu visible n invisible?contoh,

jika sebuah file mempunyai peminjam,

nama fail tersebut akan dikaburkan atau tidak aktif kerana fail tersebut mempunyai peminjam.

apabila peminjam tersebut memulangkan fail,

nama fail tersebut boleh dipilih atau sudah aktif..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-05-2007, 10:49 AM
genzy's Avatar
Nowhere Webmaster
 
Join Date: Aug 2006
Location: Malaysia
Posts: 1,581
Rep Power: 59
genzy is on a distinguished road
Create an additional field/column in the database table, i.e. the Active field.

If it's active, the Active field = 1.
If it's inactive, the Active field = 0.

So that, the page will make use of the Active field to query a set of data for active status only and vice-versa.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-05-2007, 10:58 AM
Novice Webmaster
 
Join Date: Apr 2007
Location: kuantan
Posts: 21
Rep Power: 0
beih107 is on a distinguished road
Quote:
Originally Posted by genzy View Post
Create an additional field/column in the database table, i.e. the Active field.

If it's active, the Active field = 1.
If it's inactive, the Active field = 0.

So that, the page will make use of the Active field to query a set of data for active status only and vice-versa.
maksudnye?

create 1 field dalam table yang ada file name ke?

prosesnya nak buat macam mana?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-05-2007, 11:20 AM
iamfreelancer's Avatar
Vibrate your Brain Please
 
Join Date: Sep 2005
Location: in my body lar...
Posts: 1,249
Rep Power: 65
iamfreelancer will become famous soon enough iamfreelancer will become famous soon enough
Quote:
Originally Posted by beih107 View Post
maksudnye?

create 1 field dalam table yang ada file name ke?

prosesnya nak buat macam mana?

if the field in the book table is set to 1 then the book have been borrow lah...
if borrow oledi don't list it out lar....
if book have been returned set the field back to 0 ...
if returned book then list it out loh...

the idea have been given by genzy is quite clear already lar...
in programming you need to really define your own logic, algorithm and coding alot lar...

don't be so pemalas lar.... everytime need to spoon feed meh...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-05-2007, 11:28 AM
Novice Webmaster
 
Join Date: Apr 2007
Location: kuantan
Posts: 21
Rep Power: 0
beih107 is on a distinguished road
ok,thanks..i try k
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 09-05-2007, 12:37 PM
Novice Webmaster
 
Join Date: Apr 2007
Location: kuantan
Posts: 21
Rep Power: 0
beih107 is on a distinguished road
Quote:
Originally Posted by genzy View Post
Create an additional field/column in the database table, i.e. the Active field.

If it's active, the Active field = 1.
If it's inactive, the Active field = 0.

So that, the page will make use of the Active field to query a set of data for active status only and vice-versa.
genzy..saya mintak tolong sgt ni..present saya selasa depan..kalau boleh saya nak dapatkan logik tu..tapi saya betul-betul tak tau macam mana nak buat coding tu..boleh awak bantu saya?atau beri website yang boleh saya rujuk untuk coding ni
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-05-2007, 06:24 PM
genzy's Avatar
Nowhere Webmaster
 
Join Date: Aug 2006
Location: Malaysia
Posts: 1,581
Rep Power: 59
genzy is on a distinguished road
References:
SQL UPDATE
SQL INSERT INTO

jika sebuah file mempunyai peminjam, nama fail tersebut akan dikaburkan atau tidak aktif kerana fail tersebut mempunyai peminjam.
=>

When the borrow form is submitted by the borrower,

-- Update the book status to be inactive.
UPDATE BOOK
SET ACTIVE = 0
WHERE BOOK_ID = 1234 AND BORROWER = 'ALI'

PHP to execute UPDATE SQL
PHP SQL Update Query

apabila peminjam tersebut memulangkan fail, nama fail tersebut boleh dipilih atau sudah aktif..
=>
When the return form is submitted by the borrower,

-- Update the book status to be active.
UPDATE BOOK
SET ACTIVE = 1
WHERE BOOK_ID = 1234 AND BORROWER = ''

-- Log the book borrowing history.
INSERT INTO BORROW_HISTORY(BOOK_ID, BORROWER, RETURNED_DATE)
VALUES (1234, 'ALI', '2007-7-4 04:13:54')

PHP to execute INSERT SQL
PHP SQL Insert Query

MySQL AB :: MySQL 5.0 Reference Manual :: 12.6 Date and Time Functions
Date and Time in MySQL 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-05-2007, 08:41 AM
Novice Webmaster
 
Join Date: Apr 2007
Location: kuantan
Posts: 21
Rep Power: 0
beih107 is on a distinguished road
Quote:
Originally Posted by genzy View Post
References:
SQL UPDATE
SQL INSERT INTO

jika sebuah file mempunyai peminjam, nama fail tersebut akan dikaburkan atau tidak aktif kerana fail tersebut mempunyai peminjam.
=>

When the borrow form is submitted by the borrower,

-- Update the book status to be inactive.
UPDATE BOOK
SET ACTIVE = 0
WHERE BOOK_ID = 1234 AND BORROWER = 'ALI'

PHP to execute UPDATE SQL
PHP SQL Update Query

apabila peminjam tersebut memulangkan fail, nama fail tersebut boleh dipilih atau sudah aktif..
=>
When the return form is submitted by the borrower,

-- Update the book status to be active.
UPDATE BOOK
SET ACTIVE = 1
WHERE BOOK_ID = 1234 AND BORROWER = ''

-- Log the book borrowing history.
INSERT INTO BORROW_HISTORY(BOOK_ID, BORROWER, RETURNED_DATE)
VALUES (1234, 'ALI', '2007-7-4 04:13:54')

PHP to execute INSERT SQL
PHP SQL Insert Query

MySQL AB :: MySQL 5.0 Reference Manual :: 12.6 Date and Time Functions
Date and Time in MySQL 5
tq genzy..harap code awk ni dpt membantu sy siapkan sistem ni..amin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 06-08-2007, 06:41 PM
New kid on the block
 
Join Date: Aug 2007
Location: batu caves
Posts: 5
Rep Power: 0
bahtera_alam is on a distinguished road
tak tau... otai tolong sket...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
sape tau java..?? MizFiFA Website Programming 2 05-04-2007 01:49 PM
sape terel ASP.NET? marisa Website Programming 1 22-10-2004 08:10 AM
sape tau Genetic Algorithm???? deqnaAryna Website Programming 3 04-06-2004 04:14 PM
..:: Sape Leh Tolong ::.. ra3ali Website Programming 9 26-02-2004 01:25 PM
sape terel java swing??? syudbfv Mamak Stall 1 23-01-2003 01:38 PM



All times are GMT +8. The time now is 05:50 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60