Help with creating a view - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Site and Server Administration » Help with creating a view


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-04-2006   #1 (permalink)
connor
Junior Member
 
Join Date: Jul 2006
Age: 36
Posts: 10
Default Help with creating a view

Greetings,

I'm trying to convert following query to a view


$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\'';


My current view looks like this


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????


Thanks

Connor
connor is offline   Reply With Quote


Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Subdomains walter Site and Server Administration 5 10-12-2006 11:38 AM
creating the Portal phpstart Site and Server Administration 10 08-02-2006 06:10 PM
Creating Your Own RSS Feed Sysko Forum Management 3 03-19-2006 09:46 PM
Creating an community Syncratic. Forum Management 0 03-09-2006 11:12 PM


footer left
All times are GMT. The time now is 02:40 AM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Loans | Personal Finance | Computer Help | Credit Cards | Books

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49