---
title: "Fungerar på min server men inte på ISP:ns"
type: "forum-thread"
url: "https://www.webforum.nu/amne/databaser-sql/114542-fungerar-på-min-server-men-inte-på-isp-ns"
topic: "Databaser & SQL"
topic_url: "https://www.webforum.nu/amne/databaser-sql"
author: "K++"
published: "2004-10-27T14:13:03.000Z"
updated: "2004-10-27T17:33:10.000Z"
replies: 3
views: 318
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/114542-fungerar-på-min-server-men-inte-på-isp-ns"
---

# Fungerar på min server men inte på ISP:ns

## #1 — K++, 2004-10-27T14:13Z

```php
$sql = "SELECT tabell1.titel,tabell1.season,tabell1.datum,tabell1.kategori,
tabell1.bild,tabell1.bild_on,tabell1.online from film tabell1 join film 
tabell2 on tabell1.kategori = tabell2.kategori group by 
tabell1.titel,tabell1.datum,tabell1.kategori,tabell1.season,tabell1.bild,tabell1.bild_on,tabell1.online 
having tabell1.online = max(tabell2.online) ORDER BY tabell1.online DESC";
```

You have an error in your SQL syntax near 'on tabell1.kategori = tabell2.kategori group by tabell1.titel,tabell1.datum,tabe' at line 1.

Det ovan fungerar alldeles ypperligt på min server . Men vill verkligen inte fungera på webbhotellet. Vad ska jag ta mig till?

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

## #2 — LarsG, 2004-10-27T14:33Z

```
SELECT tabell1.titel,
tabell1.season,
tabell1.datum,
tabell1.kategori,
tabell1.bild,
tabell1.bild_on,
tabell1.online 
from film tabell1 
inner join film tabell2 on tabell1.kategori = tabell2.kategori 
group by 
tabell1.titel,
tabell1.datum,
tabell1.kategori,
tabell1.season,
tabell1.bild,
tabell1.bild_on,
tabell1.online 
having tabell1.online = max(tabell2.online) 
ORDER BY tabell1.online DESC
```

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

## #3 — K++, 2004-10-27T17:19Z

Ah. så man måste ha en inner join istället för en join. Då förstår jag. Tack så mkt!

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

## #4 — LarsG, 2004-10-27T17:33Z

Det skall man egentligen inte behöva, men det var så i vissa äldre versioner av Mysql.

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

---

Tråden på webben: https://www.webforum.nu/amne/databaser-sql/114542-fungerar-på-min-server-men-inte-på-isp-ns
