I have enabled custom php in my pages through the use of the
exec-php plugin so I can run more complex pages than the standard WordPress page. I have had no problems with this plugin so far.
I have recently moved a page I was using independently from WordPress to inside the WordPress system. Now instead of running a
INSERT mysql query once like it should, it runs it 4 times leaving me with 3 redundant rows in my database. As far as I can tell there is no help on this issue, has anybody encountered this problem or know of a way to circumvent this?
As it may impact the answer I am using
mysql_query() in favour of
I have since rewrote the page to use the most appropriate
$wbdb function (my code can be found here).
In addition I found that when I use
$wpdb->flush(); it inserts 1 row only however it seems to break the loop as it doesn't load the template.