Hello there. In order to improve speed of my php code, I would like to rewrite it to an MySQL Stored Procedure, is there anyone who can help med with this? is it even possible to do?
what I want to do is this, written in some kind of pseudocode
Code:
for each post in table x
select * from table y where y.id=x.yid
if match not found
insert into y
else
if x.value = y.value
update y set y.date = now();
else
update y set y.value = x.value
endif
endif
endfor