Results 1 to 9 of 9

Thread: sape tau??

  1. #1
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0

    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..

  2. #2
    Join Date
    Aug 2006
    Location
    Malaysia
    Posts
    1,576
    Rep Power
    186
    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.

  3. #3
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    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?

  4. #4
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    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...

  5. #5
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    ok,thanks..i try k

  6. #6
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    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

  7. #7
    Join Date
    Aug 2006
    Location
    Malaysia
    Posts
    1,576
    Rep Power
    186
    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

  8. #8
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    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

  9. #9
    Join Date
    Aug 2007
    Location
    batu caves
    Posts
    5
    Rep Power
    0
    tak tau... otai tolong sket...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sape leh tolong I wat website cun?
    By badai in forum Website Design
    Replies: 18
    Last Post: 10-08-2009, 05:25 PM
  2. sape tau java..??
    By MizFiFA in forum Website Programming
    Replies: 2
    Last Post: 05-04-2007, 01:49 PM
  3. sape terel ASP.NET?
    By marisa in forum Website Programming
    Replies: 1
    Last Post: 22-10-2004, 08:10 AM
  4. sape tau Genetic Algorithm????
    By deqnaAryna in forum Website Programming
    Replies: 3
    Last Post: 04-06-2004, 04:14 PM
  5. ..:: Sape Leh Tolong ::..
    By ra3ali in forum Website Programming
    Replies: 9
    Last Post: 26-02-2004, 01:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

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