| 6:19 pm on May 11, 2005 (gmt 0)|
echo your query and see if it's what you want. For example, assuming that $id is not getting set properly you'll have
That is valid and will be successful as far as MySQL is concerned, but since it won't find a row with an id of '', no rows will be updated.
| 7:18 pm on May 11, 2005 (gmt 0)|
Add this to your code. This is what the end of it should look like.
WHERE id='$id'") or trigger_error(mysql_error());
This will give you an idea on if your program is erroring on the mysql query and on what part of the query.
The reason your program always says it's successful is because you have it checking if a variable has any information in it just after you assign it all kinds of information. It will always be true.
If you want to check to see if the query actually completes, do an if statement on the mysql_affected_rows().
if (mysql_affect_rows > 0) instead of $ok1 .
| 7:24 pm on May 11, 2005 (gmt 0)|
The problem was that i didn't pass the id to it... opps guess that was kind of important.
Now the only problem I have is that the day seems to set itself to 0000-00-00.
| 7:42 pm on May 11, 2005 (gmt 0)|
I messed up in my post too.
It's mysql_affected_rows() not what I put above
On your problem, how are you getting the date? Is the date row in your table set to DATE in MySQL?
If so, it needs to fit a certain structure.
EDIT: Didn't notice you had it that way already. I would make sure it's submitting correctly though.
| 2:47 pm on May 12, 2005 (gmt 0)|
Got the Date working. I changed the structure for display when quering to read something like Tue, Oct. 8. When I copied and pasted the sql query
(hey it was a long query and I'm to lazy to retype it) I had to delete that