Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2015-02-09 21:38:14

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

photo view sql error in all my sites

Query: INSERT INTO aspphoto_album_views SET album_id = 70, user_id = 1, ip = 2130706433, view_date = '2015-02-09 10:42:10'
Error Message: La table 'tube.aspphoto_album_views' n'existe pas
Error Number: 1146

Offline

#2 2015-02-10 06:17:03

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: photo view sql error in all my sites

Something went wrong during the upgrade. Run the following sql commands from phpmyadmin for each of the databases:

CREATE TABLE `PREFIXIFYOUUSEONEphoto_views` (
  `photo_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `ip` int(10) unsigned NOT NULL DEFAULT '0',
  `view_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  KEY `photo_id` (`photo_id`),
  KEY `user_id` (`user_id`),
  KEY `ip` (`ip`),
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2015-02-10 08:28:10

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: photo view sql error in all my sites

I will try this command  as it is rigth? 

thanks

Last edited by thiva7 (2015-02-10 10:01:58)

Offline

#4 2015-02-10 12:56:52

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: photo view sql error in all my sites

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM DEFAULT CHARSET=utf8' at line 9

Offline

#5 2015-02-10 15:26:48

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: photo view sql error in all my sites

Ahh the last comma is not needed:

CREATE TABLE `PREFIXIFYOUUSEONEphoto_views` (
  `photo_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `ip` int(10) unsigned NOT NULL DEFAULT '0',
  `view_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  KEY `photo_id` (`photo_id`),
  KEY `user_id` (`user_id`),
  KEY `ip` (`ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#6 2015-02-10 17:21:21

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: photo view sql error in all my sites

Hmm? why to create photo_views? is there already photo_views and have "queries " i have delete them to run this command.i test it in localhost and command run normaly but is not show photos

Query: INSERT INTO aspphoto_album_views SET album_id = 70, user_id = 0, ip = 2130706433, view_date = '2015-02-10 06:18:17'
Error Message: Champ 'view_date' inconnu dans field list
Error Number: 1054

Offline

#7 2015-02-10 17:29:34

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: photo view sql error in all my sites

i dont get it big_smile

in upgrade file have this

$db->query("DROP TABLE `photo_views`");
    $db->query("CREATE TABLE `photo_views` (
  `photo_id` int(11) NOT NULL DEFAULT '0',
  `user_id` int(11) NOT NULL DEFAULT '0',
  `ip` int(10) unsigned NOT NULL DEFAULT '0',
  `view_time` int(11) unsigned NOT NULL DEFAULT '0',
  KEY `photo_id` (`photo_id`),
  KEY `user_id` (`user_id`),
  KEY `view_date` (`view_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8");


without "PREFIXIFYOUUSEONE".

so now i try to add PREFIX in missed ones and this not fix the problem too. hmm

Offline

#8 2015-02-11 06:36:15

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: photo view sql error in all my sites

The error in the upgrade is that its missing #__, which means that no prefix was used. Edit modules/photo/components/view.php and replace:

            $this->db->query("INSERT INTO #__photo_views
                              SET photo_id = ".$photo_id.",
                                  user_id = ".$user_id.",
                                  ip = ".$ip.",
                                  view_date = '".date('Y-m-d h:i:s')."'");

with:

            $this->db->query("INSERT INTO #__photo_views
                              SET photo_id = ".$photo_id.",
                                  user_id = ".$user_id.",
                                  ip = ".$ip.",
                                  view_date = ".time());

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#9 2015-02-11 12:35:26

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: photo view sql error in all my sites

modules/photo/components/view.php

i dont have view.php on modules/photo/components/

are you sure about path?

and about upgrade .

my new site is fresh install and have same problem.

Offline

#10 2015-02-11 13:30:34

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: photo view sql error in all my sites

sorry modules/photo/components/photo.php

this bug was fixed in 1.2.2, dont know which version you are using.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#11 2015-02-11 18:16:42

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: photo view sql error in all my sites

1) send me last version pls. i have 1.2.1

2) problem not fixed

Last edited by thiva7 (2015-02-11 18:16:57)

Offline

#12 2015-02-12 16:47:08

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: photo view sql error in all my sites

can u help Adrian?

Offline

#13 2015-02-12 18:35:01

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: photo view sql error in all my sites

Emailed you the latestv ersion.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB