Re: PHP Related Problem - Mailing list pgsql-general

From John Clark Naldoza y Lopez
Subject Re: PHP Related Problem
Date
Msg-id 3BB28536.B90F9481@ntsp.nec.co.jp
Whole thread Raw
In response to Re: PHP Related Problem  (Keary Suska <hierophant@pcisys.net>)
Responses Re: PHP Related Problem
List pgsql-general
Keary Suska wrote:
>
> As has been said, this is an issue with your PHP code, and can't be
> determined without seeing it.

I think I just needed a break =)

Here's the problem =)

$select_query = "SELECT assignment_no, answer, isHTML FROM
assignment_answers WHERE training_id=$TRAINING_ID AND
lesson_no=$LESSON_NO AND participants_id=$PARTICIPANTS_ID ORDER BY
assignment_no;";
$res = sql_query($select_sql);

I should've been using

$select_query =) in my call to the sql_query() function =)

>
> Hint: You cannot use a database handle as a global variable outside of its
> native scope in certain versions of PHP. 4.0.6 corrects this problem.
>

Yes, you can...  I'm using the pgsql.inc from the MRBS
(http://mrbs.sourceforge.net) guys, and I am using 4.0.4pl1 =)

Thanks.


Cheers,


John Clark
--
     /) John Clark Naldoza y Lopez                           (\
    / )    Software Design Engineer III                      ( \
  _( (_    _  Web-Application Development                    _) )_
 (((\ \>  /_>    Cable Modem Network Management System <_\  </ /)))
 (\\\\ \_/ /         NEC Telecom Software Phils., Inc.  \ \_/ ////)
  \       /                                              \       /
   \    _/  phone: (+63 32) 233-9142 loc. 3113            \_    /
   /   /  cellphone: (+63 919) 399-4742                     \   \
  /   / email: njclark@ntsp.nec.co.jp                        \   \


"Intelligence is the ability to avoid doing work, yet getting the work
done"
--Linus Torvalds

pgsql-general by date:

Previous
From: Keary Suska
Date:
Subject: Re: Authenticating user `postgres'
Next
From: Justin
Date:
Subject: Re: PgAdmin for 7.1.3