Thread: Functions?
View Single Post
  #7 (permalink)  
Old Feb 3rd, 2008, 16:28
Jack Franklin's Avatar
Jack Franklin Jack Franklin is offline
Resources Administrator

SuperMember
Join Date: May 2007
Location: Cornwall, England
Posts: 1,310
Blog Entries: 8
Thanks: 10
Thanked 5 Times in 5 Posts
Re: Functions?

OK, I have it narrowed down
If I replace:
PHP: Select all

$display_posts_home mysql_query("SELECT contentid, contenttitle, contentintro, content, author, category, homepage, date_format(date, '%M %D, %Y') AS date FROM content WHERE homepage='Y' ORDER BY contentid DESC LIMIT 1 ,$postnumber"); 

With:
PHP: Select all

$display_posts_home mysql_query("SELECT contentid, contenttitle, contentintro, content, author, category, homepage, date_format(date, '%M %D, %Y') AS date FROM content WHERE homepage='Y' ORDER BY contentid DESC LIMIT 1 ,5"); 

It works. But I want that variable to be included because it adds user control. Why does it work on the home page but not functions.php?

The $postvariable is stored in config.php, and on the home page these are included like so:
PHP: Select all

<?php include('config.php'); ?>
<?php 
include('functions.php'); ?>
rest of code..., doctype, head, body, etc
Would that have anything to do with it?

Jack
__________________
Resources Administrator


Reply With Quote