Welcome to Dream.In.Code
Become an Expert!

Join 150,096 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,842 people online right now. Registration is fast and FREE... Join Now!




Adding Data To A Db

 
Reply to this topicStart new topic

Adding Data To A Db

fyrestorm
23 Sep, 2002 - 01:46 PM
Post #1

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
if i have a field in a db that already has info in it, and i just want to add to that info, do i first need to do a query to pull that information and then tack on my new data, and then reinsert it into my db, or is there an easier way to do that?
User is offlineProfile CardPM
+Quote Post

Quik
RE: Adding Data To A Db
23 Sep, 2002 - 01:54 PM
Post #2

D.I.C Lover
Group Icon

Joined: 6 Mar, 2001
Posts: 3,750



Thanked: 1 times
My Contributions
$query = "UPDATE news SET news='$news' WHERE autonum=$bullet";


I think you have to query the info already in it though. so somthing like


$query = "UPDATE news SET news='$past_text $new_text' WHERE autonum=$bullet";


And '$past_text' would be the information already in that field by using 'SELECT...
User is offlineProfile CardPM
+Quote Post

fyrestorm
RE: Adding Data To A Db
23 Sep, 2002 - 01:56 PM
Post #3

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
bummer, i was hoping that i wouldn't have to do it that way dry.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 12:16AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month