Hi,
I use somethin as
$sql = 'INSERT INTO `text` (`Field`) VALUES (''aaa'')';
Also, check things with var_dump, use mysql_error, echo $sql/$insert and
check whether the query is well formed.
my best
mario
On Sat, 2007-01-27 at 19:55 -0600, Alexander wrote:
I fixed my code and it shows up
My first thought is that your values in your insert statement are not in
quotes..
$insert = 'INSERT INTO domains ( picture, thumbnail ) values(
$picture, $thumbnail )';
Should be
$insert = 'INSERT INTO domains ( picture, thumbnail ) values( $picture,
$thumbnail)';
Hope that
]
To: Alexander [EMAIL PROTECTED]; PHP-DB php-db@lists.php.net
Sent: Saturday, January 27, 2007 8:01 PM
Subject: Re: [PHP-DB] Am I missing something?
My first thought is that your values in your insert statement are not in
quotes..
$insert = 'INSERT INTO domains ( picture, thumbnail ) values
always an
error */
- Original Message -
From: Alexander [EMAIL PROTECTED]
To: PHP-DB php-db@lists.php.net
Sent: Saturday, January 27, 2007 8:13 PM
Subject: Re: [PHP-DB] Am I missing something?
No change.
I echod my insert statement and got : INSERT INTO domains ( picture,
thumbnail
]
continuing the struggle against bad code
*/
?
From: Alexander [EMAIL PROTECTED]
Date: Sat, 27 Jan 2007 20:17:54 -0600
To: PHP-DB php-db@lists.php.net
Subject: Re: [PHP-DB] Am I missing something?
Alright, this may be the problem:
Fatal error: Call to undefined function
PROTECTED]
continuing the struggle against bad code
*/
?
From: Alexander [EMAIL PROTECTED]
Date: Sat, 27 Jan 2007 20:17:54 -0600
To: PHP-DB php-db@lists.php.net
Subject: Re: [PHP-DB] Am I missing something?
Alright, this may be the problem:
Fatal error: Call to undefined function
:29 PM
Subject: Re: [PHP-DB] Am I missing something?
Hi
you need to change this:
$insert = 'INSERT INTO domains ( picture, thumbnail ) values( $picture,
$thumbnail)';
to be:
$insert = INSERT INTO domains ( picture, thumbnail ) values( '$picture',
'$thumbnail');
variables are only interpreted
Hi
Alright, I did that. I now get :
INSERT INTO domains ( picture, thumbnail ) values( '', '')
and no data entered.
Then for some reason your variables are empty. Make sure they have data
on entry to the function. If they don't keep backtracking until you
find where it's lost.
Niel
--
annabelle.imray [EMAIL PROTECTED] wrote in message
9ehff1$jda$[EMAIL PROTECTED]">news:9ehff1$jda$[EMAIL PROTECTED]...
I have been given an example of how to use php mysql from a hosting
company. They have the following function:
#
function ExecuteQuery ($linkdb,
: [PHP-DB] Am I missing something important here ?
Your problem here is simply that the $queryresult gets lost in
the function.
It is never returned.
change return true;
into return $queryresult;
Mats Remman
-Original Message-
From: annabelle.imray [mailto:[EMAIL PROTECTED
10 matches
Mail list logo