|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
problems inserting into a table
when i use the mysql_query() function in php data don't get inserted into my database. i can still read with select
the excact line is mysql_query ("INSERT INTO eightball ('id', 'eightballid', 'birth', 'height', 'weight', 'hair', 'eyes', 'nationality', 'prime', 'secondary', 'zoneid', 'ubiid', 'rank', 'division', 'email', 'name') VALUES ('$id','$eightballid', '$birth', '$height', '$weight', '$hair', '$eyes', '$nationality', '$prime', '$secondary', '$zoneid', '$ubiid', '$rank', '$division', '$email', '$name')"); |
|
#2
|
|||
|
|||
|
Quote:
I see you are inserting someones/somethings Height... do you have a tick in there? IE: 5'8 ? if so, that could be a reason your insert isn't going in. Can you try something like this? $result = mysql_query($query) or die ("Error in query: $query. " .mysql_error()); So we can see the error? Steve |
|
#3
|
|||
|
|||
|
I'm not using ticks in the height fields, i'm using european height (centimeters).
I'm gonna try out the result-thingie. bbl |
|
#4
|
|||
|
|||
|
OK, now i treid the syntax you suggested, but it still give the same response. That's I don't get an error message, as if the query have been executed as planned. But still nothing is inserted into my db. I'm using linux, do you think maybe the user running apache needs write permissions in the directory which mysql is?
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > problems inserting into a table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|