|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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! ------------------ |
|
#2
|
|||
|
|||
|
<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' |
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > edit database error with mySQL and php3 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|