Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
ZTE MF283U 4G Unlocked Router (Used)
ayanthamaxi
Updated:
Sunday at 8:26 PM
ලංකාවේ හොඳම උපකාරක පන්ති සහ ගුරුවරුන් එකම තැනකින් - TopTuition.lk
dulithapathum
Updated:
Saturday at 8:07 AM
Colombo
RidhMathraa ’26 🎶✨
Tmadhusanka
Updated:
Jul 15, 2026
Ad icon
Colombo
PXN V10 Pro Direct Drive Racing Wheel (Under Warranty)
Abdur Rahman
Updated:
Jul 15, 2026
Ad icon
USDT ණය සේවාව - USDT Loan Service
පුරවැසියා
Updated:
Jul 15, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
MySQL Trigger Automatic Update
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="geeko" data-source="post: 29074065" data-attributes="member: 465247"><p>Code eka change kale. meken trigger eka hadanna puluwan error ekak enne na. eth awashya de venne na</p><p></p><p>DELIMITER $$</p><p></p><p>CREATE TRIGGER update_winner_trigger AFTER UPDATE ON oc_t_item_meta </p><p>FOR EACH ROW </p><p>BEGIN</p><p> -- Update winner based on the specified conditions</p><p> UPDATE oc_t_auction AS a </p><p> JOIN oc_t_item AS i ON a.item_id = i.pk_i_id </p><p> SET a.winner = </p><p> CASE </p><p> WHEN (</p><p> (SELECT m1.s_value FROM oc_t_item_meta AS m1 WHERE m1.fk_i_item_id = NEW.fk_i_item_id AND m1.fk_i_field_id = 16) > UNIX_TIMESTAMP()</p><p> AND</p><p> (SELECT m2.s_value FROM oc_t_item_meta AS m2 WHERE m2.fk_i_item_id = NEW.fk_i_item_id AND m2.fk_i_field_id = 15) >= a.bidding_price</p><p> ) THEN 1 </p><p> WHEN i.dt_expiration > UNIX_TIMESTAMP() AND (SELECT m2.s_value FROM oc_t_item_meta AS m2 WHERE m2.fk_i_item_id = NEW.fk_i_item_id AND m2.fk_i_field_id = 15) >= a.bidding_price THEN 1 </p><p> ELSE 0 </p><p> END </p><p> WHERE a.item_id = NEW.fk_i_item_id;</p><p>END;</p><p>$$</p><p></p><p>DELIMITER ;</p></blockquote><p></p>
[QUOTE="geeko, post: 29074065, member: 465247"] Code eka change kale. meken trigger eka hadanna puluwan error ekak enne na. eth awashya de venne na DELIMITER $$ CREATE TRIGGER update_winner_trigger AFTER UPDATE ON oc_t_item_meta FOR EACH ROW BEGIN -- Update winner based on the specified conditions UPDATE oc_t_auction AS a JOIN oc_t_item AS i ON a.item_id = i.pk_i_id SET a.winner = CASE WHEN ( (SELECT m1.s_value FROM oc_t_item_meta AS m1 WHERE m1.fk_i_item_id = NEW.fk_i_item_id AND m1.fk_i_field_id = 16) > UNIX_TIMESTAMP() AND (SELECT m2.s_value FROM oc_t_item_meta AS m2 WHERE m2.fk_i_item_id = NEW.fk_i_item_id AND m2.fk_i_field_id = 15) >= a.bidding_price ) THEN 1 WHEN i.dt_expiration > UNIX_TIMESTAMP() AND (SELECT m2.s_value FROM oc_t_item_meta AS m2 WHERE m2.fk_i_item_id = NEW.fk_i_item_id AND m2.fk_i_field_id = 15) >= a.bidding_price THEN 1 ELSE 0 END WHERE a.item_id = NEW.fk_i_item_id; END; $$ DELIMITER ; [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom