RE: Query Executes in MySQL Command Line, Not From PHP.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marco,

Thanks for the quick response. I'm pretty sure it's legal to have MySQL
column names that begin with numbers. I do plenty of other queries on the
same database without incident. You might be thinking of the rule in PHP
where variables can't start with numbers. Found that one out the hard way.
By that time it was too late to change the column names to make writing
queries easier. Live 'n learn.

And if you look at the code I posted, there is mysql_query($sql_element_low)
or die(mysql_error()); but it does not return an error.

That's why I'm so baffled here. Everything SEEMS to be right.

> -----Original Message-----
> From: Marco Tabini [mailto:marcot@inicode.com]
> Sent: Friday, November 15, 2002 3:52 PM
> To: Hutchins, Richard
> Cc: php-db@lists.php.net
> Subject: Re:  Query Executes in MySQL Command Line, Not From
> PHP.
> 
> 
> I don't think you can have column names that start with a number. Are
> you sure you didn't mean to write:
> 
> 
> $sql_element_low = "UPDATE $table SET medialow=NULL WHERE
> ".$table."contentID=".$_POST["id"]."";
> 
> Otherwise, try adding a simple
> 
> die (mysql_error());
> 
> after the offending line and see what PHP tells you.
> 
> 
> Marco
> -- 
> ------------
> php|architect - The magazine for PHP Professionals
> The first monthly worldwide magazine dedicated to PHP programmers
> 
> Come visit us at http://www.phparch.com!
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux