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

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

Help with php code
Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow r

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.

1) on IE when i hit enter instea

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

Table colours fail when extra row added
Hey Gurus,

I got a weird problem with formating the colour of a table made in php. Everything

media recovery
Hi,
i startup the database i got the error

SQL> startup
ORACLE instance started.

problems with script
I made a small script wich exchanges points in my website:


<?php
session_start

DELETE rows based on content
I have a link in my rows

$bit="http://bit.ly/abcd";
$query = mysql_query("D

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