TimeStamp Column Problem...


Posted on 16th Feb 2014 07:03 pm by admin

I'm mad at my self and thinking I'm a little retarded. It just be some one mistake I'm missing here. I coded my self a forum, when you reply to a topic, the topic's TimeStamp column is supposed to be updated to the current timestamp. However I attempted and failed.

I put the timestamp column on "ON UPDATE CURRENT TIMESTAMP", I set the column to NULL but seems to be at the same value. The column isn't null. I don't know if I should or shouldn't do that. I'm a complete newbie at MySql(~1Month).

Code: $sql = mysql_query("UPDATE `threads` SET `last_post_user_id` = '$id', `time` = 'NULL'; WHERE `id` = '$forum_id'");

Thanks

No comments posted yet

Your Answer:

Login to answer
65 Like 22 Dislike
Previous forums Next forums
Other forums

Problems with returning true or false in eval()'d code
Hi guys,

Would appreciate some help with a problem when running eval() on a function that sho

db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

Function
How can I make this function that once you click the link in the code it takes you to a new page wit

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

I need help with formatting date from mysql! with php!
Hello guys

*Note: this is a php question not MySQL question, please do not move it to mysql s

Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

single page with referrer to show correct page
I have a simple website with a couple of different pages. I would like to be able to in a div tag w

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash