---
title: "Problem med php och mysql (NEWBIE)"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/15926-problem-med-php-och-mysql-newbie"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "Zacay"
published: "2001-08-04T10:28:00.000Z"
updated: "2001-08-05T11:53:00.000Z"
replies: 2
views: 161
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/php/15926-problem-med-php-och-mysql-newbie"
---

# Problem med php och mysql (NEWBIE)

## #1 — Zacay, 2001-08-04T10:28Z

```
$sql = "INSERT INTO JOKES (JokeText, JokeDate) VALUE ('$joke', CURDATE())";
```

Varför funkar den inte?

Detta funkar det har jag prövat:

```
$sql = "INSERT INTO JOKES SET " . 
       "JokeText = $joke, " .
       "JokeDate = CURDATE()";
```

Vad är felet på den övre?

\[Redigerat av Zacay den 04 aug 2001\]

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

## #2 — herq, 2001-08-04T11:01Z

```
$sql = "INSERT INTO JOKES (JokeText, JokeDate) VALUE[b]S[/b] ('$joke', CURDATE())";
```

... kanske? :)

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

## #3 — Zacay, 2001-08-05T11:53Z

Vad pinsamt, glömde "S" \*Hehehehe\*
Det är sånt man inte ser själv alltså!

Tack!!

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

---

Tråden på webben: https://www.webforum.nu/amne/php/15926-problem-med-php-och-mysql-newbie
