MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 9th, 2000, 03:38 AM
camparoo camparoo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 11 camparoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have created a database, and it seems to be working fine so far. However, when I try to edit my entries via a php3 file it erases all of the data I have added in the past except the first word -
Like if the park is called 'Joshua Tree National Monument' all I get back is 'Joshua'. The database displays the data fine, but when I try to edit it erases everything after the first space....I assume I may have set up my database parameters incorrectly? Any suggestions? I am completely at a loss!

------------------

Reply With Quote
  #2  
Old July 9th, 2000, 07:47 AM
supine supine is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 35 supine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by camparoo:
<snip> ...when I try to edit my entries via a php3 file it erases all of the data I have added in the past except the first word...<snip>
[/quote]

What are you using to connect to mysql with, scripts from someone else or stuff you wrote yourself? What it sounds like is that you are not quoting you insert or update sql statements right. Try this: set var = '$var'

Reply With Quote
  #3  
Old July 9th, 2000, 03:25 PM
polman polman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 45 polman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
in php , your query statment must use single quotes, as follows...

$query = "UPDATE table SET blah='$blah' WHERE ID=$id";

note - $id isn't in ' ' because it is an integar while $blah is because it is a string...hope it helps

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > edit database error with mySQL and php3


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway