Hello.
I have a problem with updating events results via MySQL script.
I can get one event that im looking for from "_posts", and I can update meta_value column where meta_key = 'sp_results' in "_postmeta" table with my results.
But after I run query, record get updated but it doesn't show in web browser, instead of it, it's showing hour of match and clock: "00:00:00:00".
Update _postmeta SET meta_value= CONCAT('a:2:{i:1851;a:4:{s:9:"firsthalf";s:0:"";s:10:"secondhalf";s:0:"";s:5:"goals";s:2:"',(SELECT LEFT(score,1) from new_results LIMIT 1),'";s:7:"outcome";a:1:{i:0;s:',(SELECT CASE WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) = (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN '4' WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) < (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN '4' ELSE '3' END),':"',(SELECT CASE WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) = (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN 'draw' WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) < (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN 'loss' ELSE 'win' END),'";}}i:1590;a:4:{s:9:"firsthalf";s:0:"";s:10:"secondhalf";s:0:"";s:5:"goals";s:2:"',(SELECT RIGHT(score,1) from new_results LIMIT 1),'";s:7:"outcome";a:1:{i:0;s:',(SELECT CASE WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) = (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN '4' WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) < (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN '3' ELSE '4' END),':"',(SELECT CASE WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) = (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN 'draw' WHEN (SELECT LEFT(score,1) from new_results LIMIT 1) < (SELECT RIGHT(score,1) from new_results LIMIT 1) THEN 'win' ELSE 'loss' END),'";}}}')
Gist thing (in gist line was broken by the enter key for a better understanding, normaly it go in one line)
score is in this format : "1-2"
Does it have to be updated using php function?
Im soo lost on this one for few days...
Thx for any help.