Table 344 sql error vote

Phoca Gallery - image gallery extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Table 344 sql error vote

Post by Jan »

Hi, I hope, at the end of this week I summarize all the bugs from Alfa version and will release Beta (so I will take a look at this, maybe some column is missing while updating there).

Please if you can, let me know all Phoca Gallery tables you have set in your database and all columns of these tables.

You can do it in phpMyAdmin if you run these sql queries ( step by step :( ):

show columns from jos_phocagallery;
show columns from jos_phocagallery_categories;
show columns from jos_phocagallery_comments;
show columns from jos_phocagallery_img_votes;
show columns from jos_phocagallery_img_votes_statistics;
show columns from jos_phocagallery_user_category;
show columns from jos_phocagallery_votes;
show columns from jos_phocagallery_votes_statistics;

If you get the output then just copy the table (so you need not to write it manually):

e.g.:
jos_phocagallery_votes_statistics

Code: Select all

id  	int(11) 	NO 	PRI  	NULL 	auto_increment
catid 	int(11) 	NO 	  	0 	 
count 	tinyint(11) 	NO 	  	0 	 
average 	float(8,6) 	NO 	  	0.000000 	 
Thank you, Jan
If you find Phoca extensions useful, please support the project
si79mi
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Jul 2009, 17:57
Location: UK

Re: Table 344 sql error vote

Post by si79mi »

Hi,

I get this warnings when clicking at IMAGES (images are not displayed but they are already uploaded):

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\www.unique-agency.co.uk\libraries\joomla\database\database\mysql.php on line 344

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\www.unique-agency.co.uk\libraries\joomla\database\database\mysql.php on line 344


show columns from jos_phocagallery;

Code: Select all

Full Texts
Field 	Type 	Null 	Key 	Default 	Extra
id 	int(11) unsigned 	NO 	PRI 	NULL 	auto_increment
catid 	int(11) 	NO 	MUL 	0 	 
sid 	int(11) 	NO 	  	0 	 
title 	varchar(250) 	NO 	  	  	 
alias 	varchar(255) 	NO 	  	  	 
filename 	varchar(250) 	NO 	  	  	 
description 	text 	YES 	  	NULL 	 
date 	datetime 	NO 	  	0000-00-00 00:00:00 	 
hits 	int(11) 	NO 	  	0 	 
latitude 	varchar(20) 	NO 	  	  	 
longitude 	varchar(20) 	NO 	  	  	 
zoom 	int(3) 	NO 	  	0 	 
geotitle 	varchar(255) 	NO 	  	  	 
videocode 	text 	YES 	  	NULL 	 
vmproductid 	int(11) 	NO 	  	0 	 
published 	tinyint(1) 	NO 	  	0 	 
checked_out 	int(11) 	NO 	  	0 	 
checked_out_time 	datetime 	NO 	  	0000-00-00 00:00:00 	 
ordering 	int(11) 	NO 	  	0 	 
params 	text 	YES 	  	NULL 	 
extlink1 	text 	YES 	  	NULL 	 
extlink2 	text 	YES 	  	NULL 	 
show columns from jos_phocagallery_categories;

Code: Select all

Field 	Type 	Null 	Key 	Default 	Extra
id 	int(11) 	NO 	PRI 	NULL 	auto_increment
parent_id 	int(11) 	NO 	  	0 	 
title 	varchar(255) 	NO 	  	  	 
name 	varchar(255) 	NO 	  	  	 
alias 	varchar(255) 	NO 	  	  	 
image 	varchar(255) 	NO 	  	  	 
section 	varchar(50) 	NO 	MUL 	  	 
image_position 	varchar(30) 	NO 	  	  	 
description 	text 	YES 	  	NULL 	 
date 	datetime 	NO 	  	0000-00-00 00:00:00 	 
published 	tinyint(1) 	NO 	  	0 	 
checked_out 	int(11) unsigned 	NO 	MUL 	0 	 
checked_out_time 	datetime 	NO 	  	0000-00-00 00:00:00 	 
editor 	varchar(50) 	YES 	  	NULL 	 
ordering 	int(11) 	NO 	  	0 	 
access 	tinyint(3) unsigned 	NO 	MUL 	0 	 
count 	int(11) 	NO 	  	0 	 
hits 	int(11) 	NO 	  	0 	 
accessuserid 	text 	YES 	  	NULL 	 
uploaduserid 	text 	YES 	  	NULL 	 
deleteuserid 	text 	YES 	  	NULL 	 
userfolder 	text 	YES 	  	NULL 	 
latitude 	varchar(20) 	NO 	  	  	 
longitude 	varchar(20) 	NO 	  	  	 
zoom 	int(3) 	NO 	  	0 	 
geotitle 	varchar(255) 	NO 	  	  	 
params 	text 	YES 	  	NULL 	 
show columns from jos_phocagallery_comments;

Code: Select all

Field 	Type 	Null 	Key 	Default 	Extra
id 	int(11) 	NO 	PRI 	NULL 	auto_increment
catid 	int(11) 	NO 	  	0 	 
userid 	int(11) 	NO 	  	0 	 
date 	datetime 	NO 	  	0000-00-00 00:00:00 	 
title 	varchar(255) 	NO 	  	  	 
comment 	text 	YES 	  	NULL 	 
published 	tinyint(1) 	NO 	  	0 	 
checked_out 	int(11) unsigned 	NO 	  	0 	 
checked_out_time 	datetime 	NO 	  	0000-00-00 00:00:00 	 
ordering 	int(11) 	NO 	  	0 	 
params 	text 	YES 	  	NULL 	 

show columns from jos_phocagallery_img_votes;

Code: Select all

Error

SQL query:

SHOW COLUMNS FROM jos_phocagallery_img_votes

MySQL said: Documentation
#1146 - Table 'unique.jos_phocagallery_img_votes' doesn't exist 
show columns from jos_phocagallery_img_votes_statistics;

Code: Select all

Error

SQL query:

SHOW COLUMNS FROM jos_phocagallery_img_votes_statistics

MySQL said: Documentation
#1146 - Table 'unique.jos_phocagallery_img_votes_statistics' doesn't exist 

show columns from jos_phocagallery_user_category;

Code: Select all

Field 	Type 	Null 	Key 	Default 	Extra
id 	int(11) 	NO 	PRI 	NULL 	auto_increment
catid 	int(11) 	NO 	MUL 	0 	 
userid 	int(11) 	NO 	  	0 	 

show columns from jos_phocagallery_votes;

Code: Select all

Field 	Type 	Null 	Key 	Default 	Extra
id 	int(11) 	NO 	PRI 	NULL 	auto_increment
catid 	int(11) 	NO 	  	0 	 
userid 	int(11) 	NO 	  	0 	 
date 	datetime 	NO 	  	0000-00-00 00:00:00 	 
rating 	tinyint(1) 	NO 	  	0 	 
published 	tinyint(1) 	NO 	  	0 	 
checked_out 	int(11) unsigned 	NO 	  	0 	 
checked_out_time 	datetime 	NO 	  	0000-00-00 00:00:00 	 
ordering 	int(11) 	NO 	  	0 	 
params 	text 	YES 	  	NULL 	 

show columns from jos_phocagallery_votes_statistics;

Code: Select all

Field 	Type 	Null 	Key 	Default 	Extra
id 	int(11) 	NO 	PRI 	NULL 	auto_increment
catid 	int(11) 	NO 	  	0 	 
count 	tinyint(11) 	NO 	  	0 	 
average 	float(8,6) 	NO 	  	0.000000 	 
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Table 344 sql error vote

Post by Jan »

Hi, the problem is in not created tables:

jos_phocagallery_img_votes
jos_phocagallery_img_votes_statistics

Did you install or upgrade?
If you find Phoca extensions useful, please support the project
si79mi
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 02 Jul 2009, 17:57
Location: UK

Re: Table 344 sql error vote

Post by si79mi »

My main problem was that I couldn't see images (option 'Images') despite the fact that they were already in the \images\phocagallery folder. Now, following the instructions from https://www.phoca.cz/documents/17-phoca- ... em-solving
I created all the tables again in MySQL database and now it's working well :D

But, still clicking at the option 'Image Rating' you can see:

Code: Select all

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\www.unique-agency.co.uk\libraries\joomla\database\database\mysql.php on line 344

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampplite\htdocs\www.unique-agency.co.uk\libraries\joomla\database\database\mysql.php on line 344
In the option 'Images' these warnings are no longer present.
I'm not using image rating in my project so for me the problem is now solved.
BTW. Thank you for this excellent gallery, it's the best one I've ever used.
Xcantion
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 20 Jun 2009, 01:37

Re: Table 344 sql error vote

Post by Xcantion »

jos_phocagallery_img_votes
Feld Typ Kollation Attribute Null Standard Extra Aktion
id int(11) Nein Kein auto_increment
catid int(11) Nein 0
imgid int(11) Nein 0
date datetime Nein 0000-00-00 00:00:00
rating tinyint(1) Nein 0
published tinyint(1) Nein 0
checked_out int(11) UNSIGNED Nein 0
checked_out_time datetime Nein 0000-00-00 00:00:00
ordering int(11) Nein 0
params text utf8_general_ci Nein
jos_phocagallery_img_votes_statistics
Feld Typ Kollation Attribute Null Standard Extra Aktion
id int(11) Nein Kein auto_increment
imgid int(11) Nein 0
count tinyint(11) Nein 0
average float(8,6) Nein 0.000000
here you can see my tables exists :) but i have this error ... backend -> phoca->img rating

Code: Select all

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/cyber/web/libraries/joomla/database/database/mysql.php on line 344

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/cyber/web/libraries/joomla/database/database/mysql.php on line 344
i dont know why but i cant kill this error ..
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Table 344 sql error vote

Post by Jan »

Hi, try the Beta version.

If you have installed Alfa and you will upgrade to Beta, you need to remove the old table:

#__phocagallery_img_votes

in your database.

If you will install the Beta (not upgrade) then Phoca Gallery will install correct tables (no removing needed)

Jan
If you find Phoca extensions useful, please support the project
Xcantion
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 20 Jun 2009, 01:37

Re: Table 344 sql error vote

Post by Xcantion »

it seems to work :) thank you!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Table 344 sql error vote

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Table 344 sql error vote

Post by Jan »

Hi, check if the tables were created, see:
https://www.phoca.cz/documents/2-phoca-g ... em-solving

Jan
If you find Phoca extensions useful, please support the project
Post Reply