Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 52
  1. #21

    bro tabang... d ko kamao mu gamit ug conditions sa sql.... hehhehe.. na ungot gyud ko.... mao ni akong mga tables:

    script ( script_id, start, ends )
    script_error ( script_error_id, script_id, date_occured)

    unsaon mani nku ang query nku??
    anhi ra ko kutub...

    select script_id, < wala ko kabaw unsaon ang condition > as ERROR from script, script_error

    am i on d ryt track?? FYI: weak kaau ko ug mga joins sa sql especially left, right, outer, etc, JOINS... d sad ko kamao mu gamit conditions... hehe.. tabang... kakuha na unta ko sa imo pasabot na ungot ko sa SQL... diretsu na unta ni display sa gridview... hehe... TABANG...

  2. #22
    naa bay IF statement sa SQL ako nahibaw-an na conditions kay WHERE, LIKE ra... hehehe... TABANG...

  3. #23
    Quote Originally Posted by nullpointer View Post
    Para concrete imo knowledge bro...basa ug ASP.NET ebooks or tutorials...
    nag basa btaw ko bro... peru unsaon ta man nga d man gud mu storya balik ang libro kung naa ko pangutana... mao nangau ko tabang ninyu... lamat...

  4. #24
    ang condition kay depende na sa database bro.
    lahi2 man gud keyword gamit ang mga db.

    search lang sa net unsa ang condition para sa imo db

  5. #25
    bro mysql ako gamit na DB... ni abot ko ani nga statements bro...

    select script.script_id,
    (if(scipt.script_id == script_error.script_id) then
    return 'YES'
    else
    return 'NO') as ERROR from script, script_error

    unsay saup ani bro?? ako ni g try peru error ang query... saup daw... asa ang saup ani??

  6. #26
    kani ==
    dapat ani ra =

    dli mn na programming.
    hehehe

  7. #27
    naa where statement sa SQl oi

    anyway bay tynum, its better for you if mag trial and error ka and read this DataBinding in ASP.NET

    para maka grasps ka gamay sa .net

    kai basi ako hatag ang code malibug na nya ka

  8. #28
    mga bro... na solve na ang query with conditions.. special thanks to cold fusion... mao ni iyang g post na answer...

    select script.script_id,
    iif(script.script_id = script_error.script_id, 'YES', 'NO') as ERROR
    from script, script_error
    daghang salamat sa tanan.... hope tabangan gihapon ko ninyu sa akong mga upcoming problems... kay ing-ani jud baya ni ang mga starters sa usa ka language... lamat...

    lamat sad sa link bryanarzaga....

  9. #29
    bay moz_k2.... tried ur idea katong mag create ka ug imohang column via "AS" keyword sa mysql:

    SELECT script.script_id, <condition> as Error, script_error.columnB
    FROM script LEFT OUTER JOIN
    script_error on script.script_id = script.error.script_id
    d mada bro kay daghan kaau xa i display ug unwanted data... apilon nya ug display ang mga way labot... na boang nku pangita ug pama-agi unsaon para d ma apil... nya nka abot ku ug point na nka realize ko na dili jud mada kung ing-ani... kay sa tinud-anay lang jud ha... ang real problem nku kay:

    TABLE
    script_run ( script_id, starts, ends ) \\ logs the time the script is run

    script_error ( script_error_id, script_id, date_created ) \\ log is create when there is a disturbance while running a script...

    PROBLEM:

    i have to query the FF: script_error_id, starts, ends to be displayed in a gridview... with an additional column "Error", value ani kay either YES / NO... how can i manipulate the Error column para mu display xa ug YES / NO... mu display xa ug YES if ang script_id( from script_run table ) kay makita sa script_error wherein ang date_created na value kay within the range of starts and ends... else displays NO...

    IN PHP CODE:

    <? php
    $query = mysql_query("select script_id, starts, ends from script_run");
    while( $result = mysql_fetch_array($query) )
    {
    $s_id = $result[script_id];
    $starts = $result[starts];
    $ends = $result[ends];

    $query2 = mysql_query("select script_error_id from script_error where script_error = $s_id and date_created >= $starts and date_created <= $ends")

    if ( mysql_num_rows($query2) > 0 ) \\ there is an error on script
    {
    $result2 = mysql_fetch_array($query)
    $error_id = $result2[script_error_id]
    $error = 'YES'
    }
    else
    {
    $error = 'NO'
    }

    echo" <table>
    <tr> <td>ERROR ID</td> <td>STARTS</td> <td>ENDS</td> <td>ERROR</td> </tr>
    <tr> <td>$error_id</td> <td>$starts</td> <td>$ends</td> <td>$error</td> </tr>
    </table>"

    ?>
    tabang... matay aning PHP ta gikan padung ASP oi... .NET framework pa jd... daghan kaaung nakatago...
    unsaon ni pag manipulate ang values sa usa ka column every row... ( ERROR COLUMN ) TY

  10. #30
    to summarize it bai when your coding asp.net dont think Php, maka libog na para nimu, daun your problem is not php but SQL, when mu display gani ka ug based sa where statement daun ang particular statement is example .... COLUMN AS NAME where value = Something.

  11.    Advertisement

Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

 
  1. Help With ASP.Net User Controls
    By Deathnote in forum Programming
    Replies: 1
    Last Post: 03-15-2012, 07:52 PM
  2. asp.net c# newbie..pls help..
    By shawn87chau in forum Programming
    Replies: 15
    Last Post: 11-26-2008, 10:44 AM
  3. Need help on ASP.NET
    By shawn87chau in forum Programming
    Replies: 3
    Last Post: 08-08-2008, 05:25 AM
  4. Help with events in VB.NET
    By DeathFox in forum Programming
    Replies: 5
    Last Post: 12-17-2007, 08:07 PM
  5. vb.net/asp.net
    By Drksrvnt in forum Programming
    Replies: 0
    Last Post: 08-30-2006, 01:36 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
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top