Reply to Re: no insert ...

Your name:

Reply:


Posted by Iván Sánchez Ortega on 12/17/06 23:46

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Knochen wrote:

> $insert = mysql_query("INSERT INTO $table (textID,redaktion) VALUES
> ('$_POST[ID]','$row_startseiten[ID]')");
>
> I get no mysql_error, if i copy the insert directly into phpmyadmin, the
> insert works. but with the php-script the insert doesn`t create a new
> row in the table .. but why?

Because of how the variable expansion works. do an echo() of that
double-quoted string when running your script, and you'll see the error
clearly.

So, please RTFM, on the "Data types: string" chapter. And learn to use curly
braces when putting variables inside a double-quoted string.

- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

El diablo, harto de carne, se metió fraile.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFhdb4R56dWuhgxGgRAjpyAKCRaHmgkbf7hKhVRVgAl45SMhWcSgCglvtI
9bMd0oFLzjqsiXLXYjMW6rU=
=BfUC
-----END PGP SIGNATURE-----

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация