Thread: moving
View Single Post

   
  #4 (permalink)  
Old 05-02-2008, 05:05 AM
val
 
Posts: n/a
Default Re: moving

On 30 avr, 17:34, Luuk <L...@invalid.lan> wrote:

> an UPDATE should do it, give us what you tried, and the error message(s)
> you got...


I thus have to show how unskilled I am with mysql...

Here it is. The last one I tried is this :

$sql = "UPDATE dbase
SET field1= (SELECT field1 WHERE NAME='$old_name')
WHERE NAME ='$new_name'";


$old_name contains 't1' and $new_name contains 't3'
(I use PHP to send the request, through the mysql_db_query function.

1064: Erreur de syntaxe près de 'WHERE NAME='t1') WHERE NAME='t3''

val
Reply With Quote