FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 I need help with ItemTemplates View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.This topic is locked: you cannot edit posts or make replies.
Author Message
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Sat Mar 10, 2007 2:03 am Reply with quoteBack to top

Is anyone monitoring this forum. Where is/are the author(s) of this software? I'm having difficulty getting the itemtemplate to display my feeds.

Here are some details:

Database Name is: news
Channel table name is: feedInfo
Item table name is: feedItems

Everything seems to run/work fine except that when I run the sql2rss_config.php and subscribe to the feed, I get notice that the feed is empty.

The contents of the latest sql2rss_ItemTemplate I tried is:

<item>
<title>~~~Itemtitle~~~</title>
<description>~~~ItemDescription~~~</description>
<link>~~~Itemlink~~~</link>
<pubDate>~~~RSSDATE(ItemPubDate)~~~</pubDate>
<Source>~~~ItemSource~~~</Source>
</item>

The Select Query in my config file is:

$SQLQuery = "SELECT * FROM news WHERE type=\"psychic\" ORDER BY ItemPubDate ItemDescription LIMIT 10";

The database is being updated hourly and contains tons of items.

Could someone please tell me what I'm doing wrong, and help me get through this stage? I would appreciate any help. Thank you.
View user's profile
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Sat Mar 10, 2007 11:55 pm Reply with quoteBack to top

I changed the debuglevel to 3 to get more error details and this is the error I get:

Warning: Missing argument 1 for feedforall_database_error() in . . . ./sql2rss/FeedForAll_database.inc.php on line 102
ERROR: FeedForAll_database_query($config, SELECT * FROM feedItems WHERE type="\....\ " ORDER BY ItemPubDate ItemDescription DESC LIMIT 30) =>

The "..." indicates edited out part of the error.

And lines 102 through 110 of the FeedForAll_database.inc.php are:

Function FeedForAll_database_error($config) {
if ($config["DBtype"] == "mysql") {
return mysql_error();
}
else if ($config["DBtype"] == "mssql") {
return NULL;
}
return NULL;
}

Now I know that it is not what I'm doing. This is something in the code. Will the author of the script please step in and tell me how to fix this problem. It is frustrating to spend this amount of time for something I cannot fix without your help. I did pay for my copy of this script. Please help.
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Sun Mar 11, 2007 12:05 pm Reply with quoteBack to top

voices wrote:
Is anyone monitoring this forum. Where is/are the author(s) of this software? I'm having difficulty getting the itemtemplate to display my feeds.

Here are some details:

Database Name is: news
Channel table name is: feedInfo
Item table name is: feedItems

Everything seems to run/work fine except that when I run the sql2rss_config.php and subscribe to the feed, I get notice that the feed is empty.

The contents of the latest sql2rss_ItemTemplate I tried is:

<item>
<title>~~~Itemtitle~~~</title>
<description>~~~ItemDescription~~~</description>
<link>~~~Itemlink~~~</link>
<pubDate>~~~RSSDATE(ItemPubDate)~~~</pubDate>
<Source>~~~ItemSource~~~</Source>
</item>

The Select Query in my config file is:

$SQLQuery = "SELECT * FROM news WHERE type=\"psychic\" ORDER BY ItemPubDate ItemDescription LIMIT 10";

The database is being updated hourly and contains tons of items.

Could someone please tell me what I'm doing wrong, and help me get through this stage? I would appreciate any help. Thank you.


Your problem here is likely with capitalization. I see you have Itemtitle, but the default name for the feed is ItemTitle.

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Sun Mar 11, 2007 12:06 pm Reply with quoteBack to top

voices wrote:
I changed the debuglevel to 3 to get more error details and this is the error I get:

Warning: Missing argument 1 for feedforall_database_error() in . . . ./sql2rss/FeedForAll_database.inc.php on line 102
ERROR: FeedForAll_database_query($config, SELECT * FROM feedItems WHERE type="\....\ " ORDER BY ItemPubDate ItemDescription DESC LIMIT 30) =>

The "..." indicates edited out part of the error.

And lines 102 through 110 of the FeedForAll_database.inc.php are:

Function FeedForAll_database_error($config) {
if ($config["DBtype"] == "mysql") {
return mysql_error();
}
else if ($config["DBtype"] == "mssql") {
return NULL;
}
return NULL;
}

Now I know that it is not what I'm doing. This is something in the code. Will the author of the script please step in and tell me how to fix this problem. It is frustrating to spend this amount of time for something I cannot fix without your help. I did pay for my copy of this script. Please help.


I will look into this error as soon as possible, I just had shoulder surgery, and typing isn't the easiest.

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Sun Mar 11, 2007 5:34 pm Reply with quoteBack to top

MacSupport wrote:


I will look into this error as soon as possible, I just had shoulder surgery, and typing isn't the easiest.

Jim


Thank you Jim. I hope you feel much better soon. Now that I know someone is looking into it and that you are sick, please take your time. Your health is number one before script.

As you can tell, I've gone beyond the initial problem. I use sql queries at work with QMF but for some reason, I can't get this to work. My problem now is in the WHERE statement.

To give you more details, I hacked the FeedForAll_database.inc.php by changing mssql to mysql so it doesn't generate error messages. When you do that, you also have to change lines 73 and 76.

I have gotten it to work when I use this query:
FeedForAll_database_query($config, SELECT * FROM feedItems ORDER BY ItemPubDate DESC LIMIT 30)

But, it doesn't work when I include a WHERE statement like:
FeedForAll_database_query($config, SELECT * WHERE type=\"psychic"\ FROM feedItems ORDER BY ItemPubDate DESC LIMIT 30)

My mysql database contains lots of information, and my goal is to generate different rss based on a search string. For example, I want to generate an rss where the title or the description contains the word, "psychic".

Hope the this helps you to help me. If you have any questions, please let me know.
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Mon Mar 12, 2007 5:37 am Reply with quoteBack to top

voices wrote:
MacSupport wrote:


I will look into this error as soon as possible, I just had shoulder surgery, and typing isn't the easiest.

Jim


Thank you Jim. I hope you feel much better soon. Now that I know someone is looking into it and that you are sick, please take your time. Your health is number one before script.

As you can tell, I've gone beyond the initial problem. I use sql queries at work with QMF but for some reason, I can't get this to work. My problem now is in the WHERE statement.

To give you more details, I hacked the FeedForAll_database.inc.php by changing mssql to mysql so it doesn't generate error messages. When you do that, you also have to change lines 73 and 76.

I have gotten it to work when I use this query:
FeedForAll_database_query($config, SELECT * FROM feedItems ORDER BY ItemPubDate DESC LIMIT 30)

But, it doesn't work when I include a WHERE statement like:
FeedForAll_database_query($config, SELECT * WHERE type=\"psychic"\ FROM feedItems ORDER BY ItemPubDate DESC LIMIT 30)

My mysql database contains lots of information, and my goal is to generate different rss based on a search string. For example, I want to generate an rss where the title or the description contains the word, "psychic".

Hope the this helps you to help me. If you have any questions, please let me know.


Try this, when I use query statements in my PHP programming I always use single quotes because the query is inside of double quotes. Try
Code:

SELECT * WHERE type='psychic' FROM feedItems ORDER BY ItemPubDate DESC LIMIT 30


Also is your placement of the backslash just a typo in the above? I would have expected \"psychic\"

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Mon Mar 12, 2007 9:32 am Reply with quoteBack to top

MacSupport wrote:

Try this, when I use query statements in my PHP programming I always use single quotes because the query is inside of double quotes. Try
Code:

SELECT * WHERE type='psychic' FROM feedItems ORDER BY ItemPubDate DESC LIMIT 30


Also is your placement of the backslash just a typo in the above? I would have expected \"psychic\"

Jim


I tried both variations and they both give Missing argument 1 error. Yes, that was a typo.
View user's profile
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Mon Mar 12, 2007 10:38 am Reply with quoteBack to top

voices wrote:
MacSupport wrote:

Try this, when I use query statements in my PHP programming I always use single quotes because the query is inside of double quotes. Try
Code:

SELECT * WHERE type='psychic' FROM feedItems ORDER BY ItemPubDate DESC LIMIT 30


Also is your placement of the backslash just a typo in the above? I would have expected \"psychic\"

Jim


I tried both variations and they both give Missing argument 1 error. Yes, that was a typo.


Does it work if you type the query straight into MySQL ?

Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
MacSupport



Joined: 24 Feb 2005
Posts: 2805

PostPosted: Mon Mar 12, 2007 2:16 pm Reply with quoteBack to top

voices wrote:
I changed the debuglevel to 3 to get more error details and this is the error I get:

Warning: Missing argument 1 for feedforall_database_error() in . . . ./sql2rss/FeedForAll_database.inc.php on line 102
ERROR: FeedForAll_database_query($config, SELECT * FROM feedItems WHERE type="\....\ " ORDER BY ItemPubDate ItemDescription DESC LIMIT 30) =>

The "..." indicates edited out part of the error.

And lines 102 through 110 of the FeedForAll_database.inc.php are:

Function FeedForAll_database_error($config) {
if ($config["DBtype"] == "mysql") {
return mysql_error();
}
else if ($config["DBtype"] == "mssql") {
return NULL;
}
return NULL;
}

Now I know that it is not what I'm doing. This is something in the code. Will the author of the script please step in and tell me how to fix this problem. It is frustrating to spend this amount of time for something I cannot fix without your help. I did pay for my copy of this script. Please help.


That error is caused by line 238 in sql2rss.php missing the parameter. The correct line is:
Code:
          echo "ERROR: FeedForAll_database_query(\$config, $SQLQuery) => ".FeedForAll_database_error($config)."<br>\n";


Jim

_________________
Be sure to check out the FeedForAll Mac tutorials at: http://www.FeedForAll.com/tutorials/

FeedForAll Mac and rss2html.php
support@FeedForAll.com
View user's profileVisit poster's website
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Mon Mar 12, 2007 3:10 pm Reply with quoteBack to top

MacSupport wrote:


That error is caused by line 238 in sql2rss.php missing the parameter. The correct line is:
Code:
          echo "ERROR: FeedForAll_database_query(\$config, $SQLQuery) => ".FeedForAll_database_error($config)."<br>\n";


Jim


Thank you Jim. I will replace line 238 in sqlrss.php tonight when I get home. Also for tonight, once the query works, would be to specify the fields I want to include in my query, instead of the SELECT *.

Again, thank you. I appreciate your help.
View user's profile
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Mon Mar 12, 2007 9:17 pm Reply with quoteBack to top

MacSupport wrote:


That error is caused by line 238 in sql2rss.php missing the parameter. The correct line is:
Code:
          echo "ERROR: FeedForAll_database_query(\$config, $SQLQuery) => ".FeedForAll_database_error($config)."<br>\n";


Jim


Jim,

I just made the suggested change and it is now generating a parse error on line 289. Just to be sure we are using the same version and looking at the same line numbers, line 238 to be replaced is:

while (($rv = FeedForAll_database_fetch($config, $sql)) !== FALSE) {
$result .= sql2rss_subsutition($rv, $ItemTemplateData);

And not the echo "SUCCESS" statement above it, right?

Let me know.
View user's profile
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Mon Mar 12, 2007 11:09 pm Reply with quoteBack to top

MacSupport wrote:


Does it work if you type the query straight into MySQL ?

Jim


To answer this question, I just ran the following query in MySQL and it worked fine:

SELECT *
FROM `feedItems`
WHERE `ItemTitle`
OR `ItemDescription` LIKE 'psychic'
ORDER BY ItemPubDate DESC
LIMIT 50 ;

By the way, I meant to say variables to include in my query in one of my previous posts. I guess I was still thinking of Mainframe database using SAS/SQL Queries. Looking at my MySql table structure, I can only select by variable (as in the above query), not by field.
View user's profile
voices



Joined: 08 Mar 2007
Posts: 14

PostPosted: Fri Mar 23, 2007 5:17 pm Reply with quoteBack to top

voices wrote:
MacSupport wrote:


That error is caused by line 238 in sql2rss.php missing the parameter. The correct line is:
Code:
          echo "ERROR: FeedForAll_database_query(\$config, $SQLQuery) => ".FeedForAll_database_error($config)."<br>\n";


Jim


Jim,

I just made the suggested change and it is now generating a parse error on line 289. Just to be sure we are using the same version and looking at the same line numbers, line 238 to be replaced is:

while (($rv = FeedForAll_database_fetch($config, $sql)) !== FALSE) {
$result .= sql2rss_subsutition($rv, $ItemTemplateData);

And not the echo "SUCCESS" statement above it, right?

Let me know.


Jim,

Have you had the chance to look into this? I've been waiting to hear from you and see if I can get this query working. Please let me know, I really would like to get past this stage.
View user's profile
Display posts from previous:      
This forum is locked: you cannot post, reply to, or edit topics.This topic is locked: you cannot edit posts or make replies.


 Jump to:   



View next topic
View previous topic


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