Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with creating a view

Status
Not open for further replies.

wwtf

Programmer
Jul 3, 2006
3
US
$query = 'SELECT
f.id,
f.top_pos,
f.left_pos,
f.height,
f.width,
f.type,
CASE WHEN f.required = \'t\' THEN \'true\' ELSE \'false\' END as required,
f.class_id_fk,
f.visible,
i.value,
i.field_id_fk,
i.pdf_user_id_fk
FROM
pdf_field f
LEFT JOIN
pdf_input i
ON
(i.field_id_fk = f.id AND i.pdf_user_id_fk = ?)
WHERE
f.pdf_id_fk = ?
AND
f.page_num = ?
AND
f.visible = \'t\'';


CREATE OR REPLACE VIEW fields_view AS
SELECT
f.id,
f.top_pos,
f.left_pos,
f.height,
f.width,
f.type,
CASE WHEN f.required = 't' THEN 'true' ELSE 'false' END as required,
f.class_id_fk,
f.pdf_id_fk,
f.page_num,
f.visible,
i.value,
i.field_id_fk,
i.pdf_user_id_fk
FROM
pdf_field f
LEFT JOIN
pdf_input i
ON
(i.field_id_fk = f.id)

and I'm not having any luck with the following

(i.field_id_fk = f.id AND i.pdf_user_id_fk = ?)

How do I pass this parameter to a view????

greatly appreciated
~m
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top