Вы находитесь на странице: 1из 4

 SELECT id as object_id,term_taxonomy_id,0 as term_order from wp_terms inner join nw_dump

on nw_dump.category= wp_terms.name inner join wp_term_taxonomy on wp_terms.term_id =


wp_term_taxonomy.term_i order by id

 SELECT id as object_id,term_taxonomy_id,0 as term_order from wp_terms inner join


nw_dumpon nw_dump.category= wp_terms.name inner join wp_term_taxonomy on
wp_terms.term_id = wp_term_taxonomy.term_id order by id

 SELECT * FROM `notizie` WHERE `data` !='0000-00-00 00:00:00' AND `data`!=`data_i`

and `data_i`!='0000-00-00 00:00:00'

 Setps

 Step1

SELECT distinct `categoria`as name, `categoria` as slug FROM `notizie` WHERE 1 ORDER
BY `notizie`.`categoria` ASC

 setp 2

insert into wp_term_taxonomy (term_id, taxonomy) (SELECT term_id, 'category' as


taxonomy FROM `wp_terms` WHERE term_id>2)

 step3

Remove auto increment option for id field.

SELECT id as ID, 1 as post_author,data as post_date, data as post_date_gmt,testo1 as


post_content, titolo as post_title, '' as post_excerpt, 'publish' as post_status,'open' as
comment_status, 'open' as ping_status, '' as post_password, '' as post_name, '' as to_ping, '' as
pinged, data_u as post_modified, data_u as post_modified_gmt, '' as post_content_filtered ,
'0' as post_parent, '' as guid, '0' as menu_order, 'post' as post_type, '' as post_mime_type, '0' as
comment_count FROM notizie limit 100

 setp4

crate nw_dump table

INSERT INTO `nw_dump` (`ID`, `category`) VALUES

(2, 'Comunicati'),(3, 'Internet'),(4, 'Eventi'),(5,


 SELECT id as ID, 1 as post_author,data as post_date, data as post_date_gmt,testo1 as
post_content, titolo as post_title, '' as post_excerpt, 'publish' as post_status,'open' as
comment_status, 'open' as ping_status, '' as post_password, '' as post_name, '' as to_ping, '' as
pinged, data_u as post_modified, data_u as post_modified_gmt, '' as post_content_filtered , '0' as
post_parent, concat('http://localhost/wp-news/?p=',id) as guid, '0' as menu_order, 'post' as
post_type, '' as post_mime_type, '0' as comment_count FROM notizie limit 100'

 SELECT `term_taxonomy_id`,count(*) FROM wp_term_relationships group by


`term_taxonomy_id`post_date_gmt,testo1 as post_content, titolo as post_title, '' as post_excerpt,
'publish' as post_status,'open' as comment_status, 'open' as ping_status, '' as post_password, '' as
post_name, '' as to_ping, '' as pinged, data_u as post_modified, data_u as post_modified_gmt, ''
as post_content_filtered , '0' as post_parent, '' as guid, '0' as menu_order, 'post' as post_type, '' as
post_mime_type, '0' as comment_count FROM notizie WHERE id>150000 order by id

 SELECT

distinct(`keyworda`) FROM notizie UNION SELECT

distinct(`keywordb`) FROM notizie UNION SELECT

distinct(`keywordspecial`) FROM notizie

 select distinct notizie.foto

from notizie inner join immagini

on notizie.foto = immagini.nomefile

 select distinct notizie.username

from notizie inner join utenti

on notizie.username != utenti.username

 SELECT * FROM `tblarcdgames` WHERE `order`=(select `order`-1 from tblarcdgames where


gamesid=54)
 INSERT INTO nw_terms('name') values('keyworda');

 INSERT INTO nw_terms('name') values('italia')

 INSERT INTO nw_terms('name') values('europe')

 INSERTINTO nw_terms (name,slug) values('economia','economia'),


('telecomunicazioni','telecomunicazioni'),('hacker','hacker'),('internet','internet'),
('telecom','telecom'),('keywordb','keywordb'),('cronaca','cronaca'),('news','news'),('borsa','borsa'),
('mobile','mobile'),('web','web'),('rete','rete'),('keywordspecial','keywordspecial'),
('adnkronos','adnkronos'),('prnewswire','prnewswire'),('convergenza','convergenza'),('falla','falla'),
('solacria','solacria'),('authority','authority');

 SELECT autore,titolo,testo1,stato,data from notize

 SELECT distinct `categoria`as name, `categoria` as slug FROM `notizie` WHERE 1 ORDER BY
`notizie`.`categoria` ASC

 insert into wp_term_taxonomy (term_id, taxonomy) (SELECT term_id, 'category' as taxonomy


FROM `wp_terms` WHERE term_id>2)

 SELECT `nomefile`, `descrizione`, `descrizione_estesa`,1 as size, 2 as `dim_w` FROM


`immagini` WHERE 1

 SELECT `data`, `nomefile`, `descrizione`,1 as `username`,'publish' as post_status, 'attachment' as


`post_type`,'image/jpeg' as 'post_mime_type' FROM `immagini`

 UPDATE `nw_posts` set


`post_modified`=`post_date_gmt`,`post_modified_gmt`=`post_date_gmt` WHERE 1

 UPDATE test_notizie set data =concat( data , '00')

 ALTER TABLE `notizie` CHANGE `data` `data` VARCHAR(64) CHARACTER SET latin1
COLLATE latin1_swedish_ci NULL DEFAULT NULL(OR)

 SELECT id as ID, 1 as post_author,data as post_date, data as post_date_gmt,testo1 as


post_content, titolo as post_title, '' as post_excerpt, 'publish' as post_status,'open' as
comment_status, 'open' as ping_status, '' as post_password, '' as post_name, '' as to_ping, '' as
pinged, data_u as post_modified, data_u as post_modified_gmt, '' as post_content_filtered , '0' as
post_parent, '' as guid, '0' as menu_order, 'post' as post_type, '' as post_mime_type, '0' as
comment_count FROM notizie

 SELECT id as ID, 1 as post_author,data as post_date, data as post_date_gmt,testo1 as


post_content, titolo as post_title, '' as post_excerpt, 'publish' as post_status,'open' as
comment_status, 'open' as ping_status, '' as post_password, '' as post_name, '' as to_ping, '' as
pinged, data_u as post_modified, data_u as post_modified_gmt, '' as post_content_filtered , '0' as
post_parent, '' as guid, '0' as menu_order, 'post' as post_type, '' as post_mime_type, '0' as
comment_count FROM notizie limit 100

 SELECT id as ID, 1 as post_author,data as post_date, data as post_date_gmt,testo1 as


post_content, titolo as post_title, '' as post_excerpt, 'publish' as post_status,'open' as
comment_status, 'open' as ping_status, '' as post_password, '' as post_name, '' as to_ping, '' as
pinged, data_u as post_modified, data_u as post_modified_gmt, '' as post_content_filtered , '0' as
post_parent, '' as guid, '0' as menu_order, 'post' as post_type, '' as post_mime_type, '0' as
comment_count FROM test_notizie where id>130000 and id<=150000 ORDER BY
`test_notizie`.`id` ASC

Вам также может понравиться