MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 12th, 2000, 09:59 PM
ads
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I am trying to update mysql database table with command :$query = "UPDATE tablename SET textbox = '$textbox1' WHERE textbox = '$textbox'"; $textbox1 and $textbox i am getting form form as follows :
<form method="post" action="UPDATE.php3">

<?

$myrow = mysql_fetch_array($result);

$Name = $myrow["name"];

$textbox = $myrow["textbox"];

?>

View Text : <textarea cols="45" name="textbox" wrap="VIRTUAL" rows="10"> <? echo $textbox ?></textarea><br>
Edit Text : <textarea cols="45" name="textbox1" wrap="VIRTUAL" rows="10"> </textarea><br>

<input type="Submit" name="submit" value="Enter information">

</form>
Some how it is not updating. I will be thanking for help.
ads


[This message has been edited by ads (edited February 12, 2000).]

Reply With Quote
  #2  
Old February 13th, 2000, 01:14 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
Using a long string of text as your conditional is asking for trouble. Don't you have an index for the row that you could use to identify it instead?

Reply With Quote
  #3  
Old February 14th, 2000, 04:34 AM
ads
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I tried with this also but still not working.
$query = "UPDATE $userstable SET textbox = '$textbox1' WHERE name = '$name'";
when i try this
$query = "UPDATE $userstable SET textbox = 'xyzabc' WHERE name = 'somename'";
it works.

All variable values '$textbox1', '$name'
are creating problems.
Waiting for reply.
Thanks


[This message has been edited by ads (edited February 14, 2000).]

Reply With Quote
  #4  
Old February 14th, 2000, 06:48 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
print $query before sending it to make sure your variables are in there correctly.

Reply With Quote
  #5  
Old February 14th, 2000, 07:53 AM
ads
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi rod,
I have changed as per your suggestion and I got it with
$query = "UPDATE $userstable SET textbox = '$textbox1' WHERE name = '$name'";
Thanks for help

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > UPDATE mysql database table problem

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap