22. maj 2004 - 17:45Der er
7 kommentarer og 1 løsning
To sætninger i en
Hej
Jeg har følgende to sætninger, som jeg gerne vil have kørt sammen til en sætning (altså så de bliver til en forespørgsel):
strSQL = "SELECT F.*, C.Title AS CatTitle, C.ID AS CatID FROM LINKS_FSH F LEFT JOIN LINKS_CATEGORIES C ON F.CategoryID = C.ID WHERE (F.Type = 'Hjemmeside' or F.Type = 'Intern artikel' or F.Type = 'Ekstern artikel') and F.Publish <= '" & alternativeDate() & "' and F.FSH = 'True' ORDER BY F.Publish DESC LIMIT 0,15"
strSQL = "SELECT M_Name FROM FORUM_MEMBER WHERE MEMBERID = " & rs("memberID")
why dont you try using the query builder? You know how your tables are related and also what you want in the result so you should be able to put something together. And before we use too much time here, what is .... LIMIT 0,15 This isnt standard Access SQL!
Tak for tippet - jeg kigger om lidt på at få lukket nogle spg.
Her er min struktur:
CREATE TABLE LINKS_FSH ( ID int(11) NOT NULL auto_increment, MemberID int(11) NOT NULL default '0', CategoryID int(11) NOT NULL default '0', Email_sent text NOT NULL, Email_to text, Url text NOT NULL, Title text NOT NULL, Picture text NOT NULL, Description text NOT NULL, Type text NOT NULL, Language text NOT NULL, Publish date NOT NULL default '0000-00-00', Created date NOT NULL default '0000-00-00', FSH text NOT NULL, Broken int(11) NOT NULL default '0', Click int(11) NOT NULL default '0', LastIP text NOT NULL, Approved text NOT NULL, PRIMARY KEY (ID), KEY ID (ID) ) TYPE=MyISAM;
No, Access and MySQL syntax arent the same, thats why I previously asked what this is! Access doesnt understand it
"LIMIT 0,15"
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.