MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 29th, 2004, 07:49 PM
wims wims is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 wims User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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')");

Reply With Quote
  #2  
Old August 30th, 2004, 09:18 AM
steved411 steved411 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 steved411 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by wims
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')");

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

Reply With Quote
  #3  
Old August 31st, 2004, 07:34 AM
wims wims is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 wims User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm not using ticks in the height fields, i'm using european height (centimeters).
I'm gonna try out the result-thingie. bbl

Reply With Quote
  #4  
Old August 31st, 2004, 07:43 AM
wims wims is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 wims User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > problems inserting into a table


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