PHP Get End Date from Database by Post ID
-
I have been trying, unsuccessfully, for days to get the end date from the database based on the post_id. I simply do not know the proper PHP to get the “end” time by the post_id. I am self-taught in PHP, so most likely this is PHP 101, but I have never taken PHP 101.
Everything I have tried, and believe me I have tried, does not work. I can get the post_date, but that comes from the post table with the same post_id, not the ai1ec_event table. The two share the same post_id.
I’ve tried this, but it doesn’t work where $HitID = the post_id.
$event_date = get_post_meta($HitID, 'end', true);Any help you could give me would be extremely helpful.
I just don’t know how to tell PHP that I want to get the value from the post_id of a custom table vs the default post table with the same post_id. Also, the column is called “end” and this is a PHP function. So that complicates things as well.
The topic ‘PHP Get End Date from Database by Post ID’ is closed to new replies.