|
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-----
Navigation:
[Reply to this message]
|