oracle and php

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 974
Joined: Mon Oct 01, 2012 12:32 pm

Fri Oct 16, 2015 7:01 pm

Your issue is with quotes. It's often easiest to build a variable with your query first, quoted with double quotes and then pass the variable. something like:

Code: Select all

$conn = oci_connect('it', 'itpassword', 'database.pace.local/ITDB');
ui_print_header('Item Numbers and Docs');
$query = "select trim(A.itemno) itemno,
  A.descrip item_descrip,
  dl.descrip library,
  ed.docno,
  ed.descrip doc_descrip,
  ed.status,
  dl.path ||'\'|| dr.filename file_path
from arinvt A
  left join doc_used du ON A.ID = du.source_id
  left join doc_revision dr ON du.external_doc_id = dr.external_doc_id
  left join external_doc ed ON du.external_doc_id = ed.ID
  left join doc_library dl ON ed.doc_library_id = dl.id
where du.source = 'ARINVT'
and a.eplant_id = 3
and dr.hist = 'N'
and trim(A.itemno) = '7775'
order by a.itemno, ed.docno";
ui_print_footer(date('Y-m-d H:i:s')
do_query($conn, $query );
 

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 974
Joined: Mon Oct 01, 2012 12:32 pm

Tue Oct 27, 2015 7:30 am

No problem, I'm glad I could help

Post Reply