Hi,
I have 1 SQL in project and this sql is report source. But Where condition not working! Report is empty..
SELECT
havale_takip.*,
cariler.Cari_Ad
FROM
havale_takip
JOIN cariler ON cariler.Sirket = havale_takip.Sirket AND havale_takip.Cari_Kod = cariler.Cari_Kod
WHERE
((HavaleTakipNo =(select havaleid from param where user='#USER_ID#')))
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Report SQL Criteria
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
Re: Report SQL Criteria
Does the SQL return the desired rows when you run the SQL in phpMyAdmin? (Of course, replace #USER_ID# with a user id)
Re: Report SQL Criteria
What is this
[0] :
===USER==========
globeadmin
===PDO MESSAGE===
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nubuilder4.___nu162a385afb2d51___' doesn't exist
===SQL===========
SELECT * FROM (SELECT * FROM ___nu162a385afb2d51___ ) AS tmp
===BACK TRACE====
/var/www/core/nurunpdf.php - line 250 (nuRunQuery)
/var/www/core/nurunpdf.php - line 68 (nuBuildReport)
/var/www/core/nurunpdf.php - line 23 (nuRunReportId)
[0] :
===USER==========
globeadmin
===PDO MESSAGE===
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nubuilder4.___nu162a385afb2d51___' doesn't exist
===SQL===========
SELECT * FROM (SELECT * FROM ___nu162a385afb2d51___ ) AS tmp
===BACK TRACE====
/var/www/core/nurunpdf.php - line 250 (nuRunQuery)
/var/www/core/nurunpdf.php - line 68 (nuBuildReport)
/var/www/core/nurunpdf.php - line 23 (nuRunReportId)
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
Re: Report SQL Criteria
Changed SQL, I use #record_id# in the new sql. #record_id# is worked but #user_id# didn't work. But no problem because report is working.
Thank you so much..
SELECT
havale_takip.Cari_Kod,
havale_takip.Vade_Tarihi,
havale_takip.USD,
havale_takip.TL,
havale_takip.Durum,
havale_takip.Banka,
havale_takip.HavaleTakipNo,
havale_takip.AlacakID,
havale_takip.Kur,
havale_takip.Sirket,
havale_takip.havalerecordid,
cariler.Cari_Ad
FROM
havale_takip
JOIN cariler ON havale_takip.Cari_Kod = cariler.Cari_Kod
WHERE
((havale_takip.havalerecordid = '#RECORD_ID#'))
Thank you so much..
SELECT
havale_takip.Cari_Kod,
havale_takip.Vade_Tarihi,
havale_takip.USD,
havale_takip.TL,
havale_takip.Durum,
havale_takip.Banka,
havale_takip.HavaleTakipNo,
havale_takip.AlacakID,
havale_takip.Kur,
havale_takip.Sirket,
havale_takip.havalerecordid,
cariler.Cari_Ad
FROM
havale_takip
JOIN cariler ON havale_takip.Cari_Kod = cariler.Cari_Kod
WHERE
((havale_takip.havalerecordid = '#RECORD_ID#'))