|
Posted by Matt on 06/06/07 17:46
Hi there,
I'm working with a bit of a messy query but I'm not looking for tips
on improving it (it's been a headache enough, haha).
Basically, my site posts articles written by multiple authors. In the
past we'd associate these articles with a user_id referring to the
"Multiple" author, but now writers want their own writing within an
article to be linked with them.
This led to me splitting the article table in two: we have
review_index which has all the generic/global data for the article
(band name, record label, etc), and review_pages which has a (non-
unique) field review_id which links to the id row in the review_index
table. With me so far?
The form I wrote for admins to post multiple author reviews works like
this:
- asks them for global variables and inserts them
- asks them to add a review and select username for an author
- upon submitting this, offers them to post another (still associated
with the original globals) or lets them close the job.
It's done in this way because in order to associate the review_id with
the id field, I have to KNOW what the id field in the review_index is
going to be. I can't just +1 to the most recent one, since this'll
cause issues if we delete reviews etc.
So what this means is, when a user clicks onto an article while we're
in the process of posting it, they may load a page with all the
globals in place, but none of the actual content. I'm trying to echo a
simple "Please reload the page in a few minutes" message, but can't
get a working result. I've tried variations on:
if ($review_text = null) {
echo "come back soon!";
}
if (empty($review_text)) {
echo "come back soon!";
}
if (!$query_result) {
echo "come back soon!";
}
but none of these display. Is there a solution here? It's a trivial
issue really since it's essentially catering to people who click on an
article within a 1 minute or so period, but still.
Matt
[Back to original message]
|