Page 1 of 3

Cant Success While Transfreing Old DB Table

Posted: 18 May 2017, 10:17
by c a g a t a y
Hi there
More than 3 days I cant succes to transfer my old PhocaGuestbook items to new DB :x :x

I did what you explained in this page

https://www.phoca.cz/development/50-joom ... o-joomla-3

Is there anyone to change my db tables? I can send my old and new DB tables...Pelase help :oops:

Old PhocaGuestbook verison: 2.0.7
New PhocaGuestbook verison: 3.0.6

Best Redads

Re: Cant Success While Transfreing Old DB Table

Posted: 18 May 2017, 13:21
by c a g a t a y
What I run this query

Code: Select all

INSERT `jos_phocaguestbook_items` (id, catid, parent_id, lft, level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time) SELECT id+1 AS id, 10013 AS catid, 1 AS parent_id, ordering AS lft, 1 AS level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time FROM `jos_temp_phocaguestbook_items`
it turns with this error;
Image

Re: Cant Success While Transfreing Old DB Table

Posted: 19 May 2017, 09:50
by Jan
Hi, what program do you use for making the sql queries?

What if you paste the queries in e.g. phpMyAdmin?

What if you manually change the date from "0000-00-00 00:00:00" to some real date "2017-05-19 01:01:01"?

Really hard to say what is wrong in the database with date settings :-(

Jan

Re: Cant Success While Transfreing Old DB Table

Posted: 21 May 2017, 19:17
by c a g a t a y
Jan wrote: 19 May 2017, 09:50 Hi, what program do you use for making the sql queries?
Hi Jan
Yes i am using phpMyAdmin in my Localhost (using wamp)
Jan wrote: 19 May 2017, 09:50
What if you manually change the date from "0000-00-00 00:00:00" to some real date "2017-05-19 01:01:01"?
I dont understand this part. How can i change? Or where can i change? Within 2.5 DB ???

Regards

Re: Cant Success While Transfreing Old DB Table

Posted: 22 May 2017, 01:33
by Jan
Hi, I mean in the source data, in the rows directly in phpMyAdmin which include this date with '00 ...' in checked_out_time column.

Usually, the column "checked_out_time" is still the same, really no idea why you get such an error message? :idea:

Jan

Re: Cant Success While Transfreing Old DB Table

Posted: 22 May 2017, 09:01
by c a g a t a y
Hi Jan
I opened my Joomla 2.5 PhocaGuestbook SQL file in Notepad++ and manuelly changed 0000-00-00 00:00:00" to --> "2017-05-19 01:01:01
I run this query;

Code: Select all

INSERT `avsr3_phocaguestbook_items` (id, catid, parent_id, lft, level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time) SELECT id+1 AS id, 10013 AS catid, 1 AS parent_id, ordering AS lft, 1 AS level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time FROM `avsr3_pphocaguestbook_items`
And got these errors :x
(I am in localhost/PhpMyAdmin platform)

Code: Select all

Error
Static analysis:

34 errors were found during analysis.

Unexpected token. (near "`avsr3_phocaguestbook_items`" at position 7)
Unexpected token. (near "(" at position 36)
Unexpected token. (near "id" at position 37)
Unexpected token. (near "," at position 39)
Unexpected token. (near "catid" at position 41)
Unexpected token. (near "," at position 46)
Unexpected token. (near "parent_id" at position 48)
Unexpected token. (near "," at position 57)
Unexpected token. (near "lft" at position 59)
Unexpected token. (near "," at position 62)
Unrecognized keyword. (near "level" at position 64)
Unexpected token. (near "," at position 69)
Unexpected token. (near "username" at position 71)
Unexpected token. (near "," at position 79)
Unexpected token. (near "userid" at position 81)
Unexpected token. (near "," at position 87)
Unexpected token. (near "email" at position 89)
Unexpected token. (near "," at position 94)
Unexpected token. (near "homesite" at position 96)
Unexpected token. (near "," at position 104)
Unexpected token. (near "ip" at position 106)
Unexpected token. (near "," at position 108)
Unexpected token. (near "title" at position 110)
Unexpected token. (near "," at position 115)
Unexpected token. (near "content" at position 117)
Unexpected token. (near "," at position 124)
Unrecognized keyword. (near "date" at position 126)
Unexpected token. (near "," at position 130)
Unexpected token. (near "published" at position 132)
Unexpected token. (near "," at position 141)
Unexpected token. (near "checked_out" at position 143)
Unexpected token. (near "," at position 154)
Unexpected token. (near "checked_out_time" at position 156)
Unexpected token. (near ")" at position 172)
SQL query: Documentation

INSERT `avsr3_phocaguestbook_items` (id, catid, parent_id, lft, level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time) SELECT id+1 AS id, 10013 AS catid, 1 AS parent_id, ordering AS lft, 1 AS level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time FROM `avsr3_pphocaguestbook_items`

MySQL said: Documentation

#1364 - Field 'path' doesn't have a default value

Re: Cant Success While Transfreing Old DB Table

Posted: 23 May 2017, 12:34
by Jan
Hi, the "INTO" is missing there, run this query:

Code: Select all

INSERT INTO `avsr3_phocaguestbook_items` (id, catid, parent_id, lft, level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time) SELECT id+1 AS id, 10013 AS catid, 1 AS parent_id, ordering AS lft, 1 AS level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time FROM `avsr3_pphocaguestbook_items`
but only after the temp table were done.
Anyway sorry for the typo error in the query, I have fixed it.

Let me know if this works for you.

Thank you, Jan

Re: Cant Success While Transfreing Old DB Table

Posted: 23 May 2017, 13:53
by c a g a t a y
returned with these errors :x :x

Code: Select all

Error
Static analysis:

34 errors were found during analysis.

Unexpected token. (near "`avsr3_phocaguestbook_items`" at position 7)
Unexpected token. (near "(" at position 36)
Unexpected token. (near "id" at position 37)
Unexpected token. (near "," at position 39)
Unexpected token. (near "catid" at position 41)
Unexpected token. (near "," at position 46)
Unexpected token. (near "parent_id" at position 48)
Unexpected token. (near "," at position 57)
Unexpected token. (near "lft" at position 59)
Unexpected token. (near "," at position 62)
Unrecognized keyword. (near "level" at position 64)
Unexpected token. (near "," at position 69)
Unexpected token. (near "username" at position 71)
Unexpected token. (near "," at position 79)
Unexpected token. (near "userid" at position 81)
Unexpected token. (near "," at position 87)
Unexpected token. (near "email" at position 89)
Unexpected token. (near "," at position 94)
Unexpected token. (near "homesite" at position 96)
Unexpected token. (near "," at position 104)
Unexpected token. (near "ip" at position 106)
Unexpected token. (near "," at position 108)
Unexpected token. (near "title" at position 110)
Unexpected token. (near "," at position 115)
Unexpected token. (near "content" at position 117)
Unexpected token. (near "," at position 124)
Unrecognized keyword. (near "date" at position 126)
Unexpected token. (near "," at position 130)
Unexpected token. (near "published" at position 132)
Unexpected token. (near "," at position 141)
Unexpected token. (near "checked_out" at position 143)
Unexpected token. (near "," at position 154)
Unexpected token. (near "checked_out_time" at position 156)
Unexpected token. (near ")" at position 172)
SQL query: Documentation

INSERT `avsr3_phocaguestbook_items` (id, catid, parent_id, lft, level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time) SELECT id+1 AS id, 10013 AS catid, 1 AS parent_id, ordering AS lft, 1 AS level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time FROM `avsr3_pphocaguestbook_items`

MySQL said: Documentation

#1364 - Field 'path' doesn't have a default value

Re: Cant Success While Transfreing Old DB Table

Posted: 23 May 2017, 15:04
by Jan
Hi, sorry, the copied sql didn't include the INTO, try to add it again, with the INTO:

Code: Select all

INSERT INTO `avsr3_phocaguestbook_items` (id, catid, parent_id, lft, level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time) SELECT id+1 AS id, 10013 AS catid, 1 AS parent_id, ordering AS lft, 1 AS level, username, userid, email, homesite, ip, title, content, date, published, checked_out, checked_out_time FROM `avsr3_phocaguestbook_items`
Anyway, in the sql I copied here, was:
avsr3_pphocaguestbook_items, maybe this is wrong too as it should be: avsr3_phocaguestbook_items (in case your prefix is not: avsr3_p)

Re: Cant Success While Transfreing Old DB Table

Posted: 23 May 2017, 15:54
by c a g a t a y
hi Jan
avsr3_pphocaguestbook_items, maybe this is wrong too as it should be: avsr3_phocaguestbook_items (in case your prefix is not: avsr3_p)
to make clear;
avsr3_phocaguestbook_items --> this is Joomla 3.0 guestbook (no data)
avsr3_pphocaguestbook_items --> is old guestbook table (from Joomla 2.5) (with data)
inserted table into the Joomla 3.0 SQL schema

So, I have a SQL databese (at localhost/phpmyadmin) and 2 colums/tables (as seen below)
With these knowledges, what will i do?

Image