![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Pear Pear programming, this is a very complex subject as with using pear with php can be a difficult task for some, so lets talk pear. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| I'm trying to use getOne() and am seeing strange results. $emails = Array([LIST OF EMAIL ADDRESSES HERE]); $mdb2->loadModule('Extended'); $sql = 'SELECT id FROM member WHERE email = ?'; foreach ($emails as $email) { $data = $mdb2->extended->getOne($sql1, null, array($email), array('string')); ... } I'm receiving this error: _doQuery: [Error message: Could not execute statement] [Last query: EXECUTE mdb2_statement_pgsqlad71a4301905dca52f90dba959ae20 1f (Object)] [Native message: ERROR: column "object" does not exist] So, is my syntax for getOne() incorrect? b | |||
|
| Advertisements |
| | #2 | ||
| brian wrote: > I'm trying to use getOne() and am seeing strange results. > > $emails = Array([LIST OF EMAIL ADDRESSES HERE]); > > $mdb2->loadModule('Extended'); > $sql = 'SELECT id FROM member WHERE email = ?'; > > foreach ($emails as $email) > { > $data = $mdb2->extended->getOne($sql1, null, array($email), > array('string')); > > ... > } first: you defined $sql and then used $sql1 second: 'string' isn't a MDB2 data type, use 'text' instead. Best regards, -- Lorenzo Alberton http://pear.php.net/user/quipo __________________________________________________ _________________ Quipo Free Internet - 2 email, 150 Mb di spazio web e molto di pił. ADSL, Hardware & Software Online Store | |||
|
| | #3 | ||
| Lorenzo Alberton wrote: > brian wrote: > >> I'm trying to use getOne() and am seeing strange results. >> >> $emails = Array([LIST OF EMAIL ADDRESSES HERE]); >> >> $mdb2->loadModule('Extended'); >> $sql = 'SELECT id FROM member WHERE email = ?'; >> >> foreach ($emails as $email) >> { >> $data = $mdb2->extended->getOne($sql1, null, array($email), >> array('string')); >> ... >> } > > > > first: you defined $sql and then used $sql1 > Oops--i'd altered the code for simplicity's sake. > second: 'string' isn't a MDB2 data type, use 'text' instead. > Perfect, thanks! b | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: column, exist, mdb2, quotobjectquot |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| Featured Websites | ||||
|