i am getting error while using NEW.id in database triggers

35
April 15, 2019, at 12:20 PM

i am trying to create a trigger for inserting data.and I want to get the current id for that author or user who is inserting or change in table.but I am getting this error:

unknown column id in new

here is my query

INSERT INTO logs VALUES(null,NEW.id,'inserted',NOW());

I have two table in my database comments table and logs table...

can anybody help me how can I get rid of this error...

READ ALSO
Creating Unique Index And Insert Data

Creating Unique Index And Insert Data

I am making different question regarding on my problemThey suggest me on this thread Best way to avoid duplicate entry into mysql database Thank you for pointing out this thread on me

32
How can I set up password-less in ssh2_connect login?

How can I set up password-less in ssh2_connect login?

I have gone through the post where I can do ssh without giving password [https://askubuntucom/a/296574/905016] But I want to login through ssh2_connect in php, where I need to give password detail

51
search nested array of objects and return full parents as results | javascript

search nested array of objects and return full parents as results | javascript

Hello I need a bit of help finishing up my functionI've successfully written a recursive function to loop through a nested object and find the results

45
Android GridLayout with dynamic number of columns per row

Android GridLayout with dynamic number of columns per row

I have cards with different width and I would like to create a Grid Layout where width = match the parent (filling the screen) and fixed heightI would like to set the cards in the Grid layout so the number of columns changes accordingly to the width of the elements...

19