MySQL ERROR: Error Number: 1054
Posted: 07 September 2008 02:14 PM   [ Ignore ]
Newbie
Rank
Total Posts:  17
Joined  2005-06-14

hi

Is anyone familiar with tis error message - and its solution?

MySQL ERROR:

Error Number: 1054

Description: Unknown column ‘rating_rev_r_y’ in ‘field list’

Query: UPDATE `ee_cupp_ratings` SET `rating_rev_r_y` = ‘1’ WHERE rating_id = ‘21’

Thanks
Steve

Profile
 
 
Posted: 08 September 2008 07:00 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Steve,

Do you have some sample code as to what your template looks like and what you’re trying to do? smile

I’m also assuming you’re using Rating 2.2.0?

 Signature 
Profile
 
 
Posted: 10 September 2008 12:40 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  17
Joined  2005-06-14

Thanks - here’s the sample code

<br>
<
h5>title of the review</h5>
<
br>
<
b>Review:&nbsp;&nbsp;</b> {review}
<br>
<
h7>Date: {rating_date format="%l, %d/%m/%y"} | Reviewer: <a href="/user/edit/{rating_author_id}">{screen_name}</a> | {if count == "1"}First! |{/if}  write your own review for
<
a href="http://mobsocnet.com/index.php/msn/permalink/{title}/#write_review" title="write your own review of this app">this app</a> |

{exp:rating:form entry_id="{entry_id}" form_name="your_form_name" require_membership="yes"}
<input type="hidden" name="name" value="{screen_name}" />
<
input type="hidden" name="email" value="{email}" />
<
label for="review">how do you rate {title}</label>
<
select name="rating">
<
option value="1">1</option>
<
option value="2">2</option>
<
option value="3">3</option>
<
option value="4">4</option>
<
option value="5">5</option>
</
select>
<
input type="submit" value="submit">
{/exp:rating:form}


<br>All time rating for {title} |
{exp:rating:stats entry_id="{entry_id}" theme="default"}{stars_overall_avg}
| {overall_count} review{if overall_count !="1"}s{/if}
| total votes for this app: {overall_sum}
{
/exp:rating:stats} </h7></p>

{exp:rating:rating_rev_stats rating_id="{rating_id}"}
<a href="{path="{my_template_group}/review_useful/{rating_id}/yes"}">Yes</a> | <a href="{path="{my_template_group}/review_useful/{rating_id}/no"}" >No</a>
This review has received {y} ({percent_y}%) thumbs up votes and {n} ({percent_n}%) thumbs down votes out of a total of {total} votes.
{/exp:rating:rating_rev_stats}

</div>

And here’s the page it appears on.
http://mobsocnet.com/index.php/msn/reviews_all_apps/

(When you go here I am puzzled by the fact that all the ‘reviews’ have got thumbs up and down votes even though the site is not ‘open’ yet and I only tested this feature on a couple of the reviews) - anyway this is a side issue as I would like to get rid of the SQL error when you click on ‘yes’ or ‘no’.

Cheers
Steve

Profile
 
 
Posted: 12 September 2008 07:49 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Steve,

Is all of that code wrapped in a Weblog:Entries loop? smile

So what you’re saying is that by default, every rating is showing 1 up, 1 down?

 Signature 
Profile
 
 
Posted: 12 September 2008 09:12 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  17
Joined  2005-06-14

Thanks for your come back...mmm...I dont seem to have wrapped it up in a weblog entries loop.

Could that be the issue?

Cheers
Steve

Profile
 
 
Posted: 12 September 2008 09:16 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

What does your full code look like? smile

 Signature 
Profile
 
 
Posted: 13 September 2008 02:30 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  17
Joined  2005-06-14

Thanks Pieman for taking a look - here’s the code from the whole page (see below) -sorry the code was too long to fit in this post :-(
Should I email you the page? Or could you please look at the source code via the link to the page below Please advise what is best..

Here’s the page itself.
http://mobsocnet.com/index.php/msn/reviews_all_apps/

If you click ‘yes’ or ‘no’ you get to replicate the MySQL ERROR.

Here’s the URL of the page that carries the MySQL ERROR
http://mobsocnet.com/index.php/msn/review_useful/39/yes/

Could it be caused by the code I have on the > /review_useful/ < page, which is shown below

{exp:rating:insert_rating_rev rating_id="{segment_3}"}
{if failure}We were unable to count your vote.{/if}
{if success}Your vote was counted successfully.{/if}
{message}
{/exp:rating:insert_rating_rev}

history.go(-1)"]Return to Previous Page

Thanks for your help

Steve

Profile
 
 
Posted: 15 September 2008 07:50 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

I’m thinking that you might have fixed your bug already. When I click yes or no I don’t see a MySQL error anymore. It looks like somewhere along the way either the rating_rev_r_y column was not created in the DB or it was improperly deleted from the DB. This can sometimes happen as a bug in the upgrade routine. Let us know if you can still replicate the bug. In the mean time we’ll have a look at the possible cause of the DB trouble in the module.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 15 September 2008 01:52 PM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
Rank
Total Posts:  13
Joined  2005-08-19

I second what Mitchell said. It appears that at some point an upgrade didn’t properly add a column to the DB.

If you have not already done so, upgrade to 2.2.0 (or later). That should fix this problem.

 Signature 
Profile
 
 
Posted: 15 September 2008 04:07 PM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  17
Joined  2005-06-14

hi Guys

The problem hasn’t gone away :-(
I wish it had.

I un-installed the app (which is 2.2.0) and re-installled. Just the same problem.

Try hitting ‘yes’ or ‘no’ - on this page

http://mobsocnet.com/index.php/msn/reviews_all_apps/

- and the resulting page shows the MySQL error.

However when I go back to this page (http://mobsocnet.com/index.php/msn/reviews_all_apps/) and re-fresh I can see that the response - say a ‘yes’ click has been added to the total.

I am still wondering if this is to blame ?

---
Could it be caused by the code I have on the > /review_useful/ < page, which is shown below

{exp:rating:insert_rating_rev rating_id="{segment_3}"}
{if failure}We were unable to count your vote
.{/if}
{if success}Your vote was counted successfully
.{/if}
{message}
{
/exp:rating:insert_rating_rev}

history
.go(-1)"]Return to Previous Page

---

Any further help would be appreciated

Thanks
Steve

Profile
 
 
Posted: 17 September 2008 08:33 AM   [ Ignore ]   [ # 10 ]
Administrator
Avatar
Rank
Total Posts:  13
Joined  2005-08-19

Hi Cuppa,

I see why uninstalling / reinstalling didn’t work. The missing columns are only added during the upgrade process; they were left out of the install process altogether. I’m not sure which developer made that goof, but we’ll figure it out and flog him appropriately.

If you can wait for the next release, this fix will be included. If not, PM me and I’ll send you a couple queries you can use to get on the way to recovery.

 Signature 
Profile
 
 
Posted: 22 September 2008 10:43 AM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  3
Joined  2006-07-24

Hi -
I’m getting the same MySQL Error from the control panel when I try to edit a review:

MySQL ERROR:
Error Number: 1054
Description: Unknown column ‘rating_rev_r_y’ in ‘field list’
Query: UPDATE `exp_ratings` SET `rating_rev_r_y` = ‘0’ WHERE rating_id = ‘1’

I looked at exp_ratings and it doesn’t look like that column exists. I’m using 2.2.0 and this was the first install. Let me know if there is anything I can do prior to the next release.

Thanks!!!

Lydia

Profile
 
 
Posted: 09 October 2008 07:41 PM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

This issue should now be corrected in Rating 2.2.1 smile
http://www.solspace.com/forums/viewthread/1368/

 Signature 
Profile