Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

SQL in smarty for data feed

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
efab
Smarty n00b


Joined: 04 Mar 2019
Posts: 1

PostPosted: Mon Mar 04, 2019 8:48 pm    Post subject: SQL in smarty for data feed Reply with quote

Hey there,

We're using JTL and its default export functionality for data feeds.
For our google shopping campaigns, we would like to adjust our default title.
We already created a custom field and I already caught the fields in our database, this is the SQL query:

select a.cArtNr as SKU, b.cName as Title_Default, f.cWertVarchar as Title_Google_Shopping
from tArtikel a
left join tArtikelBeschreibung b on a.kArtikel = b.kArtikel
left join tArtikelAttribut c on a.kArtikel = c.kArtikel
left join tAttribut d on c.kAttribut = d.kAttribut
left join tAttributSprache e on d.kAttribut = e.kAttribut
left join tArtikelAttributSprache f on c.kArtikelAttribut = f.kArtikelAttribut

/*google shopping title*/
where e.kAttribut = 1182 and f.cWertVarchar != '' and f.cWertVarchar is not null

NOW, how to translate this query into smarty?
Never worked before with smarty.

I hope you can help me.

Cheers

Christoph
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1530

PostPosted: Thu Mar 07, 2019 9:13 am    Post subject: Reply with quote

You don't "translate SQL to Smarty".
You prepare data in your PHP code, as you need them, and THEN pass them to Smarty.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP