0

I want to obtain the metatag_config data through a mysql query with php from my db drupal, in order to obtain the site name, description, keywords and abtract.
How can I do it? Or where they are stored, then the config field of metatag_config returns something like this:


a: 7: {s: 5: "title"; a: 1: {s: 5: "value"; s: 26: "[node: title] | [site: name]";} s: 11: " description "; a: 1: {s: 5:" value "; s: 14:" [node: summary] ";} s: 8:" abstract "; a: 1: {s: 5:" value "; s: 14: "[node: summary]";} s: 8: "keywords"; a: 1: {s: 5: "value"; s: 38: "I am 502, News Guatemala, Guatemala";} s : 8: "og: title"; a: 1: {s: 5: "value"; s: 0: "";} s: 7: "og: type"; a: 1: {s: 5: " value "; s: 0:" ";} s: 6:" og: url "; a: 1: {s: 5:" value "; s: 0:" ";}}

  • What are you trying to accomplish? It does not make very much sense to use SQL-query to get this data. [site: name] is a Drupal token that gets replaced later with the site name. I suppose you should better use Drupal API go get the information you are interested in. – Stefan Korn Sep 6 '19 at 10:15
  • Well, what I want to achieve is to know where that data is stored in the database, because I want to do my rest, but I need to get that data – Giancarlo Lopez Sep 6 '19 at 16:21
  • Can you, specify the data you want to retrieve ? – berramou Sep 6 '19 at 21:41
  • yes sure, site name, description, abstract and keywords, I found them in the metatag_config table but the column they are in is in LONGBLOB data type and has them saved like this to: 7: {s: 5: "title"; a: 1: {s: 5: "value"; s: 26: "[node: title] | [site: name]";} s: 11: "description"; a: 1: {s: 5: "value"; s: s: 8: "keywords"; a: 1: {s: 5: "value"; s: 38: "I am 502, News Guatemala, Guatemala";} ;}}. Now the site name and the abstract don't know where they are – Giancarlo Lopez Sep 6 '19 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.