PDA

View Full Version : mysql error UPDATE dont work


manola
10-14-2007, 05:38 PM
Hello!

I am using $vbulletin->$db->$query_read many times with no problems but I can not use $vbulletin->$db->$query_write.

Here is the sentence

Code:

$vbulletin->$db->query_write("UPDATE cesta_numeros SET iduser = $idnom WHERE num = $mirado");


Variables $idnom and $mirado works and have true values.

If I open my custom vbulletin page without this sentence, all works fine but if I use it I see a beautiful white page without any code.

What's wrong?

I am using this sentence and works fine

Code:

$leecompra = $vbulletin->db->query_first("SELECT iduser FROM cesta_numeros WHERE num=$mirado LIMIT 1");


Thanks

sabret00the
10-14-2007, 05:44 PM
one too many dollar signs
$vbulletin->$db->query_write("UPDATE cesta_numeros SET iduser = $idnom WHERE num = $mirado");

should be
$vbulletin->db->query_write("UPDATE cesta_numeros SET iduser = $idnom WHERE num = $mirado");

manola
10-14-2007, 05:50 PM
U have a new friend for the rest of ur life, thank u very much :D ;) It worked!

sabret00the
10-14-2007, 05:53 PM
Glad it worked :)