Current location: Hot Scripts Forums » Programming Languages » PHP » Item Database Issues


Item Database Issues

Reply
  #11 (permalink)  
Old 11-18-09, 11:17 PM
The Knowing The Knowing is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks, I found the WHERE issue about 10mins ago. I know the issue with the ereg. I plan to change it once I get the other parts of the script working. For the mysql_query code I am having trouble with the updating.

The code up above will not work for updating, but when I add the actual value it updates. What do I need to do so this is automatic? Grab the current price and post it into the where? This isn't making much sense to me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #12 (permalink)  
Old 11-19-09, 06:27 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Have you echoed or var_dumped what ereg is creating?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #13 (permalink)  
Old 11-19-09, 07:26 AM
The Knowing The Knowing is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Yes. It is right below the mysql queries.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #14 (permalink)  
Old 11-19-09, 03:24 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Could you post the output of the ereg calls?

Quote:
The code up above will not work for updating, but when I add the actual value it updates.
This sounds like the ereg calls are not creating the data you expect, using echo/var_dump to display the values will allow you to see what the code is trying to put in the database.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #15 (permalink)  
Old 11-19-09, 04:27 PM
The Knowing The Knowing is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
From what I understand the issue is with the WHERE. When I input the WHERE data manually it works, but when I use the $row['Item'] it doesn't work. It should be using the Item name for the place to enter the data shouldn't it? It works when I put the price that is stored in the database though.

BTW this problem has nothing to do with the ereg. It is an issue with the mysql_query.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #16 (permalink)  
Old 11-19-09, 06:42 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Then echo out the mysql_query to see what is being sent to MySQL. Have you used PHP: mysql_error - Manual

It would be much easier for people to help you if you would post some of the requested output - even if it is exactly what you expect. You could also post the database schema.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Superfish jquery menu problems with modification transcend2005 CSS 2 03-25-09 02:30 AM
Why won't select list item insert into database? gavacho PHP 2 12-05-08 07:38 PM
Item database site lymia Script Requests 0 12-01-08 05:36 PM
Trouble with positioning naviboard BlueDragoness HTML/XHTML/XML 1 01-12-08 07:42 AM
Need Epinions-lite system in PHP & MYSQL wali001 Job Offers & Assistance 4 01-12-04 07:02 AM


All times are GMT -5. The time now is 10:20 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.