Re: [PHP] binding adodb

2006-03-02 Thread Brian V Bonini
On Wed, 2006-03-01 at 19:25, Chris wrote:
> Raúl Castro Marín wrote:
> > I got a little question, I just start to use binding adodb but I got a 
> > problem: my primary query on Oracle is:
> > 
> > $query = "SELECT munici_mun, UPPER(nombre_mun) 
> > FROM MUNI 
> > WHERE departa_dpt = ? AND 
> > munici_mun <= 994";
> > 
> > It is execute with any problem, but when I add another clause with keyword:
> > 
> > AND UPPER(nombre_mun) LIKE '%?%'   then next sentence is execute but no 
> > record is returned
> > $query = "SELECT munici_mun, UPPER(nombre_mun) 
> > FROM MUNI 
> > WHERE departa_dpt = ? 
> > AND munici_mun <= 994 
> > AND UPPER(nombre_mun) LIKE '%?%' 
> > 
> > I think that adodbd doesn't parse "?" like a variable on clause LIKE '%?%'. 
> > What can I do to write this sentence correctly?

Does it return anything if you run it directly against the DB?



-- 

s/:-[(/]/:-)/g


BrianGnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
Key Info: http://gfx-design.com/keys
Linux Registered User #339825 at http://counter.li.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] binding adodb

2006-03-02 Thread Raúl Castro Marín

Hello I could resolve the problem, I'm rewrote query:

$query = "SELECT munici_mun, UPPER(nombre_mun)
   FROM MUNI
   WHERE departa_dpt = ?
AND munici_mun <= 994
 AND UPPER(nombre_mun) LIKE ?"

then I only change the variable definition like:

$bind[] = '%'.$key.'%';

thanks

- Original Message - 
From: "Chris" <[EMAIL PROTECTED]>

To: "Raúl Castro Marín" <[EMAIL PROTECTED]>
Cc: 
Sent: Wednesday, March 01, 2006 7:25 PM
Subject: Re: [PHP] binding adodb




Raúl Castro Marín wrote:
I got a little question, I just start to use binding adodb but I got a 
problem: my primary query on Oracle is:


$query = "SELECT munici_mun, UPPER(nombre_mun) FROM MUNI WHERE 
departa_dpt = ? AND munici_mun <= 994";


It is execute with any problem, but when I add another clause with 
keyword:


AND UPPER(nombre_mun) LIKE '%?%'   then next sentence is execute but no 
record is returned
$query = "SELECT munici_mun, UPPER(nombre_mun) FROM MUNI WHERE 
departa_dpt = ? AND munici_mun <= 994 AND UPPER(nombre_mun) LIKE '%?%' I 
think that adodbd doesn't parse "?" like a variable on clause LIKE '%?%'. 
What can I do to write this sentence correctly?


thanks for your help!


Hi,

You might get a quicker response on their mailing list:

http://adodb.sourceforge.net/#mail

It might not pick it up because it's in quotes but they will be able to 
tell you for sure.


--
Postgresql & php tutorials
http://www.designmagick.com/

--=neXtPaRt_1141258927
Content-Type: text/plain;

Este correo se ha verificado por el Firewall de la CDMB

--=neXtPaRt_1141258927-- 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] binding adodb

2006-03-01 Thread Chris

Raúl Castro Marín wrote:

I got a little question, I just start to use binding adodb but I got a problem: 
my primary query on Oracle is:

$query = "SELECT munici_mun, UPPER(nombre_mun) 
FROM MUNI 
WHERE departa_dpt = ? AND 
munici_mun <= 994";


It is execute with any problem, but when I add another clause with keyword:

AND UPPER(nombre_mun) LIKE '%?%'   then next sentence is execute but no record 
is returned
$query = "SELECT munici_mun, UPPER(nombre_mun) 
FROM MUNI 
WHERE departa_dpt = ? 
AND munici_mun <= 994 
AND UPPER(nombre_mun) LIKE '%?%' 


I think that adodbd doesn't parse "?" like a variable on clause LIKE '%?%'. 
What can I do to write this sentence correctly?

thanks for your help!


Hi,

You might get a quicker response on their mailing list:

http://adodb.sourceforge.net/#mail

It might not pick it up because it's in quotes but they will be able to 
tell you for sure.


--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] binding adodb

2006-03-01 Thread Raúl Castro Marín
I got a little question, I just start to use binding adodb but I got a problem: 
my primary query on Oracle is:

$query = "SELECT munici_mun, UPPER(nombre_mun) 
FROM MUNI 
WHERE departa_dpt = ? AND 
munici_mun <= 994";

It is execute with any problem, but when I add another clause with keyword:

AND UPPER(nombre_mun) LIKE '%?%'   then next sentence is execute but no record 
is returned
$query = "SELECT munici_mun, UPPER(nombre_mun) 
FROM MUNI 
WHERE departa_dpt = ? 
AND munici_mun <= 994 
AND UPPER(nombre_mun) LIKE '%?%' 

I think that adodbd doesn't parse "?" like a variable on clause LIKE '%?%'. 
What can I do to write this sentence correctly?

thanks for your help!