WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

Error in SQL code

BrianBOSS

New member

0

0%

Status

Offline

Posts

43

Likes

0

Rep

0

Bits

225

3

Months of Service

0%
I aim to fetch tagged posts. The table 'postip' has the following columns: 'sira' INT 11 AI, 'baslik' VARCHAR 150, 'makale' TEXT, 'ekleyen' INT 11, 'kategori' INT 11, 'postip' table 'post_sira' INT 11, 'link_sira' INT 11, 'tip' VARCHAR 20 (can be: Makale/Tag/Gallery/Event), 'linkler' table 'linkid' INT 11 AI, 'linkurl' VARCHAR 150, 'linkad' VARCHAR 150.

SQL code:
SELECT g.*, p.*, l.*
FROM 'gonderiler' AS g
INNER JOIN 'postip' AS p ON g.sira = p.post_sira
INNER JOIN 'linkler' AS l ON p.link_sira = l.linkid
WHERE l.linkurl = "davulganet"

Output:
- sira: 1
- baslik: Makale ba?l?k
- makale: Makale içeri?i
- ekleyen: 12
- kategori: 1
- post_sira: 1
- link_sira: 2
- Linkid: 2
- tip: Etiket
- Linkurl: davulganet
- Linkad: Davulga.net

I would like to express my gratitude in advance. My issue is that the 'tip' value is coming as "Etiket" (Tag) but I need the output in the form of gallery/article/event. How can I achieve this? Thank you in advance.
 

249

6,622

6,642

Top