---
title: "Fel i join"
type: "forum-thread"
url: "https://www.webforum.nu/amne/databaser-sql/96524-fel-i-join"
topic: "Databaser & SQL"
topic_url: "https://www.webforum.nu/amne/databaser-sql"
author: "LR^evil.sid"
published: "2004-02-04T00:02:57.000Z"
updated: "2004-02-04T00:14:54.000Z"
replies: 1
views: 149
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/databaser-sql/96524-fel-i-join"
---

# Fel i join

## #1 — LR^evil.sid, 2004-02-04T00:02Z

Varför fungerar inte denna fråga?

```
	Dim SQL: SQL = SQL & "select "
	         SQL = SQL & "n.id, r.id, g.id, l.id "
		 SQL = SQL & "from "
		 SQL = SQL & "news n, releases r, guestbook g, live l "
		 SQL = SQL & "where "
		 SQL = SQL & "n.id => "&ArrCookie(0)&" and "
		 SQL = SQL & "r.id => "&ArrCookie(1)&" and "
		 SQL = SQL & "g.id => "&ArrCookie(2)&" and "
		 SQL = SQL & "l.id => "&ArrCookie(3)
'		 SQL = SQL & "limit 0,0 "
```

```
[MySQL][ODBC 3.51 Driver][mysqld-4.0.14-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '=> 0 and r.id => 0 and g.id => 0 and l.id => 0' at line 1
```

Permalänk: https://www.webforum.nu/p/96524

## #2 — LR^evil.sid, 2004-02-04T00:14Z

```
Dim SQL: SQL = SQL & "select "
         SQL = SQL & "n.id, r.id, g.id, l.id "
	 SQL = SQL & "from "
	 SQL = SQL & "news n, releases r, guestbook g, live l "
	 SQL = SQL & "where "
	 SQL = SQL & "n.id > "&ArrCookie(0)&" and "
	 SQL = SQL & "r.id > "&ArrCookie(1)&" and "
	 SQL = SQL & "g.id > "&ArrCookie(2)&" and "
	 SQL = SQL & "l.id > "&ArrCookie(3)
```

Fungerar fint... jag som inte tänkter riktig genom vad jag skulle göra.

Permalänk: https://www.webforum.nu/p/1268674

---

Tråden på webben: https://www.webforum.nu/amne/databaser-sql/96524-fel-i-join
