|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this 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
|
|||
|
|||
|
php mysql code error
whats wrong with this???
PHP Code:
|
|
#2
|
||||
|
||||
|
You're using the concatenation operator within a string, so the query you're actually sending mysql is (assuming $_GET['values'] is "test"):
Code:
INSERT INTO maps_admin (admin_name) VALUES(' . test . ')
Change your line to: PHP Code:
and see how that works. |
|
#3
|
|||
|
|||
|
still doestn work
![]() |
|
#4
|
||||
|
||||
|
Hmmm, I think somebody in another instance of this thread recommended that you add a die(mysql_error()) statement to the line in which you execute the query. This should help you narrow down the bug. Do you have your field named correctly? (Case matters.) Also try echoing your query and pasting it manually into the command line tool to see what that nets you. What's the precise error message you're getting? Have you selected a database to use? Was it the right one? Are you sure you're actually connected?
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > php mysql code error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|