MySQL Datenbank

Auswertung/Anzahl von Gutscheine

Submitted by Rainer on Do, 12/29/2016 - 18:18

Gutscheine 2017:
SELECT count( * ) FROM content_type_gutscheine WHERE field_gltig_bis_value LIKE '%.2017'

SELECT count( * ) FROM content_type_gutscheine WHERE field_gltig_bis_value = '31.12.2017'

 

SELECT title, field_gutscheinwert_value, field_affiliate_programm_value, field_gltig_bis_value
FROM `content_type_gutscheine`
LEFT OUTER JOIN `node` ON content_type_gutscheine.nid = node.nid
WHERE field_gltig_bis_value = '17.01.2017'
AND TYPE = 'gutscheine'
AND status = 1
ORDER BY title
LIMIT 0 , 300

Pagetitle + Metadaten automatisieren

Submitted by Rainer on Do, 12/29/2016 - 18:10

Wert Type 5:

UPDATE page_title SET page_title = REPLACE(page_title,'Preishals - aktueller 10 €','Preishals - aktueller [field_gutscheinwert-formatted]')
UPDATE nodewords SET content = REPLACE(content,'10 €','[field_gutscheinwert-formatted]') WHERE name='description' AND type='5'
UPDATE nodewords SET content = REPLACE(content,'10 €','[field_gutscheinwert-formatted]') WHERE name='keyword' AND type='5'

Nodewords Robots Metadaten

Submitted by Rainer on Do, 12/29/2016 - 18:08

(index,follow)

UPDATE nodewords SET content = REPLACE(content,'a:2:{s:14:"index_nofollow";s:16:"noindex,nofollow";s:5:"value";a:0:{}}','a:2:{s:12:"index_follow";s:12:"index,follow";s:5:"value";a:4:{s:9:"noarchive";i:0;s:5:"noodp";i:0;s:9:"nosnippet";i:0;s:6:"noydir";i:0;}}') WHERE name='robots' AND type=6

ALT und Title

Submitted by Rainer on Do, 12/29/2016 - 17:56

UPDATE `content_type_gutscheine` SET `field_alt_value`=`field_gutscheinbanner_value`

UPDATE `content_type_gutscheine` SET `field_title_value`= SUBSTRING_INDEX(`field_title_value`, '">
field_url[0]['value']" ?>" onclick="window.open(this.href); return false;" title="<?php print $node->field_title[0]['value']" ?>">field_image_url[0]['value']" ?>" alt="<?php print $node->field_alt[0]['value']" ?>" height="31" width="88" />

<?php print $node->field_gutscheinbanner[0]['view'] ?>

Facebook Bilder

Submitted by Rainer on Do, 12/29/2016 - 17:53

og:image
UPDATE nodewords SET content = REPLACE(content,'hoodboyz-75x75.png','hoodboyz-200x200.png') WHERE name='og:image'

fb:admins
UPDATE nodewords SET content = REPLACE(content,'a:1:{s:5:"value";s:0:"";}','a:1:{s:5:"value";s:15:"100000892376852";}') WHERE name='fb:admins' AND type=6

UPDATE content_type_gutscheine LEFT OUTER JOIN `node` ON content_type_gutscheine.nid = node.nid SET field_gltig_bis_value = REPLACE(field_gltig_bis_value,'17.01.2013','17.01.2000') WHERE field_gltig_bis_value = '17.01.2013' AND TYPE = 'gutscheine' AND status = 0

Monatliche SQL-Updates

Submitted by Rainer on Do, 12/29/2016 - 17:37

UPDATE page_title SET page_title = REPLACE(page_title,'Februar 2017','März 2017');
UPDATE nodewords SET content = REPLACE(content,'Februar 2017','März 2017') WHERE name='page_title';
UPDATE nodewords SET content = REPLACE(content,'28.02.2017','31.03.2017') WHERE name='description';