Closed Thread Icon

Topic awaiting preservation: mysql "update" problem (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12054" title="Pages that link to Topic awaiting preservation: mysql &amp;quot;update&amp;quot; problem (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: mysql &quot;update&quot; problem <span class="small">(Page 1 of 1)</span>\

 
air_phear
Nervous Wreck (II) Inmate

From: sweden
Insane since: Jul 2001

posted posted 02-17-2002 12:35

Hi !

Im trying to get this to work:

$data = mysql_db_query("thetable", "UPDATE thetable SET row1 = '$row1', row2 = '$row2' , row3 = '$row3' WHERE id = '$id");
mysql_query($data);

:::
the $vars are
sent from a "sendpage.php" with "<form action=changepage.php>"
were the values in the "text inputs" are fetched
from the same (thetable) table...
:::
am i making myself clear, and in that case, could anyone help me ?
::.



over here----------------------------------------------------------->

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 02-17-2002 13:09

well, I think you're seriously confused here.
try something along the lines of
$query = 'update ...'
and then
$result = mysql_query($query,$linkIdentifier);

or have another look at the documentation :-)

so long,
TP

Tyberius Prime

[This message has been edited by Tyberius Prime (edited 02-17-2002).]

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 02-18-2002 03:22

Like TP said, you need to check the docs.

You don't use the two statements you have there together. You use either mysql_db_query() by itself (which has been depreciated BTW) or mysql_select_db() and mysql_query() together.

Check the docs for mysql_db_query() here.

-Butcher-

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 02-18-2002 13:37
quote:
$data = mysql_db_query("thetable", "UPDATE thetable SET row1 = '$row1', row2 = '$row2' , row3 = '$row3' WHERE id = '$id");



you forgot to add another closing single quote to WHERE id=

btw, no need to add quote too! so just write: where id=$id



air_phear
Nervous Wreck (II) Inmate

From: sweden
Insane since: Jul 2001

posted posted 02-19-2002 14:11

lallous >

yeah, sometimes the simplest error is the hardest to find =)

thanx !


« BackwardsOnwards »

Show Forum Drop Down Menu