Results 1 to 2 of 2

Thread: MySql Query...:(

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Resolved MySql Query...:(

    I give up....I have tried everything...what I want is to pick out the 5 first articles after a date. I have this:


    Code:
    $resultat1 = mysql_query("select fArrID, fBy, fDato, fSted, fNavn, fText, fBildebox from fremover where fBy like 'A' or fBy like 'O' and fDato >= ".$StartDato." ORDER BY fDato",$db);

    I think the problem is near the end where I both have to have that articles that have the field fBy 'A' and 'O', becuase it pics out two articles that have 'A' in fBy, but they are before the date I have in $StartDato........do I have to add the [and fDato >= ".$StartDato."] part after the fBy like 'A' too? If so...how...when I tried that I got realy realy werid resulst. I did it like this:

    Code:
    $resultat1 = mysql_query("select fArrID, fBy, fDato, fSted, fNavn, fText, fBildebox from fremover where fBy like 'A' and fDato >= ".$StartDato." or fBy like 'O' and fDato >= ".$StartDato." ORDER BY fDato",$db);
    It says it gives me 35 results but I can only get 3 on the screen.......and help?
    Last edited by NoteMe; Sep 29th, 2004 at 05:56 PM.

  2. #2

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    **** my night horse......I fixed it.......it was the second one. But I forgot that I changed the variable $resultat to $resultat1 when I was testing something else. That was why I got 35 results.....now it works like a charm..


    I am soooo happy....


    ØØ

Posting Permissions

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



Click Here to Expand Forum to Full Width