04. november 2003 - 20:43Der er
17 kommentarer og 1 løsning
Select * from x+1
Er det muligt at gøre dette på nogen måde: strSQL = "SELECT * FROM MENUCAT+1"
Jeg vil tage noget fra en database og så bare tælle 1, 2, og 3 tilbage og snuppe dem også, til forskellige steder vel og mærke.
så altså vil jeg lave 4 koder: strSQL = "SELECT * FROM MENUCAT" strSQL = "SELECT * FROM MENUCAT+1" strSQL = "SELECT * FROM MENUCAT+2" strSQL = "SELECT * FROM MENUCAT+3"
Kommunerne har digitaliseret indgangen for borgerne. Men bag skærmen håndteres mange arbejdsgange stadig manuelt mellem systemer, mails og organisatoriske siloer.
a UNION "unites" the result of two or more SQL SELECTS. The field types need to be the same for each table, but if they are from the same table then that should be no problem!
I wanna make a menu where it selects 4 sub catagories, and then posts the links linkd to that catagory underneath it.
So first i take all from the table ie Community where there are the links: forum, members ect
Then i wanna go further down and select the next in the database, and write out the links under that catagory... all in all i want 4 catagories, were links with the catagory is posted in...
The result I think I can give you will be like this
Catagory 1 Link 1 Catagory 1 Link 1 Catagory 1 Link 1 Catagory 1 Link 1 Catagory 2 Link 2 Catagory 2 Link 2 Catagory 3 Link 3 Catagory 4 Link 4 Catagory 4 Link 4 Catagory 4 Link 4 . .
so in your ASP code you loop through the recordset until Category changes
SELECT MENUCAT.MENUCAT, SUBSITES.HEADLINE, SUBSITES.TEXT, SUBSITES.LINKNAME, SUBSITES.PICTURE FROM MENUCAT LEFT JOIN SUBSITES ON MENUCAT.ID = SUBSITES.MENUCAT ORDER BY MENUCAT.ORDER;
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.