FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 Warning: Division by zero in /home/etc. View next topic
View previous topic
Post new topicReply to topic
Author Message
FallColours



Joined: 24 Apr 2017
Posts: 5
Location: Texas

PostPosted: Mon Apr 24, 2017 7:27 pm Reply with quoteBack to top

I have run the query that I set in the config file, now named myfeed.php and it returns exactly what I asked it to when I do a query via phpadmin at the database, but when I try to access the feed via http:/mywebsite.com/myfeed.php I continually receive the following error- Warning: Division by zero in /home/socialinterests/public_html/Feeds/myfeed.php on line 32.

I've looked this issue up at stackoverflow and other places but it makes no sense to me. Could you give me any help? This is the statement on line 32.

$SQLQuery = "SELECT * FROM posts WHERE post_status LIKE "%1%" ORDER BY post_title DESC LIMIT 25";

Any help would be greatly appreciated.

Thanks :)
View user's profile
Tech Support



Joined: 27 Aug 2004
Posts: 2782

PostPosted: Tue Apr 25, 2017 12:13 pm Reply with quoteBack to top

I think it's a quote problem. One of the below should help:

$SQLQuery = "SELECT * FROM posts WHERE post_status LIKE '%1%' ORDER BY post_title DESC LIMIT 25";

$SQLQuery = 'SELECT * FROM posts WHERE post_status LIKE "%1%" ORDER BY post_title DESC LIMIT 25';

_________________
Create RSS Feeds
Audio Recording and Editing
View user's profile
FallColours



Joined: 24 Apr 2017
Posts: 5
Location: Texas

PostPosted: Wed Apr 26, 2017 6:51 am Reply with quoteBack to top

That took care of it! Thanks so much for your quick reply.
View user's profile
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme