[PHP-DB] Re: UPPER(AES_DECRYPT(...)) bug?

2008-04-04 Thread Roberto Mansfield
Philip Thompson wrote: > Hi all. > > Here's my disclaimer: this question is solely MySQL-related - I just > happen to be programming in PHP. > > I have found some functionality which *appears* to be a bug, but I > didn't want to report it before asking some intelligent people. I have > this simpl

[PHP-DB] Re: Table optimization ideas needed

2008-03-26 Thread Roberto Mansfield
Shelley wrote: > Hi all, > > I made a post a week ago to ask for the idea of the fastest way to get > table records. > Fyi, > http://phparch.cn/index.php/mysql/35-MySQL-programming/126-fastest-way-to-get-total-records-from-a-table > Hi Shelly, I question your mysql database setup. I have a log

[PHP-DB] Re: [PDO] Cannot execute queries while other unbuffered queries are active

2008-03-24 Thread Roberto Mansfield
Have you tried using closeCursor() after your query is finished? -Roberto Fabian Golle wrote: > Hey, > > I'm using a PDO-MySQL in a class of my Accounting-Framework. The problem: if > I call my function query(), see below, multiple times, I get the error: > > > > Array ( [0] => HY000 [1] =>

Re: [PHP-DB] Help with JOIN query

2008-03-06 Thread Roberto Mansfield
Mysql doesn't support subselects in 4.0.x. That was added in 4.1. -Roberto J. Hill wrote: > I may be a little confused: the desire is to return all the rows from > TableA that match the record_id of a row in TableB that has the MAX > timestamp? > > If so, why not something like: > > SELECT * FR

Re: [PHP-DB] No resultset with ocibindbyname

2008-02-27 Thread Roberto Mansfield
> And here is the output of "desc projekte_generisch": > Name Null? Type > PID NOT NULLCHAR(8) > ANFANGNOT NULLVARCHAR2(8) > ENDE VARCHAR2(8) > LAENGENOT NULLNUMBER I believe the problem has to do with your field type fo

Re: [PHP-DB] PDO and Oracle

2007-11-20 Thread Roberto Mansfield
Christopher Jones wrote: > > > Roberto Mansfield wrote: >> Folks, >> >> I was looking at rewriting some old DB classes using PDO with the Oracle >> driver, but I'm a bit confused about the current state of things. Some >> docs said the PDO Oracle d

[PHP-DB] PDO and Oracle

2007-11-19 Thread Roberto Mansfield
Folks, I was looking at rewriting some old DB classes using PDO with the Oracle driver, but I'm a bit confused about the current state of things. Some docs said the PDO Oracle driver was experimental and subject to change. I also had a hard time trying to get the driver to compile against Oracle's

Re: [PHP-DB] PHP and MySQL design question

2007-11-05 Thread Roberto Mansfield
vior for version 3.x and up. I also couldn't replicate this behavior in one of our tables on a 4.x server with ~2 million rows. EXPLAIN indicated the same (a,b) index would be used regardless of the order of the fields in the where clause. Query times were equally fast as well. -- Roberto M

Re: [PHP-DB] PHP and MySQL design question

2007-11-02 Thread Roberto Mansfield
> Chris wrote: >> Mysql will actually only use one index per table. I was surprised to >> find this out but it's mentioned in >> http://www.amazon.com/High-Performance-MySQL-Jeremy-Zawodny/dp/0596003064/ >> - page 64 (just looked it up to include a page ref). >> >> No idea if this is mentioned anyw

Re: [PHP-DB] PHP and MySQL design question

2007-10-24 Thread Roberto Mansfield
It shouldn't matter what order the columns are referenced. Mysql is smart enough to optimize the query based on the available indexes. In fact, it should be good enough just to create an index on each column that will be searched -- not on combinations of columns. Do you have any performance number

Re: [PHP-DB] What is the most efficient way to store SELECT results

2007-10-09 Thread Roberto Mansfield
Many sites just requery the database on each page and just return the relevant results. If you are using mysql, you can use LIMIT in your query to restrict the results for a specific "page". You can also do something in similar in Oracle using nested queries and row ids. If the query is slow, you

[PHP-DB] Re: PHP ORACLE SSL ?

2007-08-03 Thread Roberto Mansfield
Narasimha Gangaiah wrote: > Greetings, > > I am writing a web application using PHP. I want to use PEAR::DB to connect > to user database. > I want the connection to be secured using SSL. > > Does oci8.sl (php oracle dblibrary) support SSL connection to Oracle Server > ? > > I know we can secur

Re: [PHP-DB] multiple params in pg_prepare

2007-07-17 Thread Roberto Mansfield
How about combining your POINT() into one parameter: $result = pg_prepare($dbconn, "my_query", 'INSERT INTO gtest VALUES ($1,GeomFromText($2, 4326))'); $result = pg_execute($dbconn, "my_query", array("phptest", "POINT(23 24)")); Doris Lam wrote: > Nope, still doesn't work...for the moment

Re: [PHP-DB] Re: Error

2007-06-26 Thread Roberto Mansfield
ith binding parameter to oracle procedures in php. > If I remove the binding the procedure works. If I add it it fails. > > Any ideas > > David > > -Original Message- > From: Roberto Mansfield [mailto:[EMAIL PROTECTED] > Sent: 26 June 2007 16:09 > To: php-db@

[PHP-DB] Re: Error

2007-06-26 Thread Roberto Mansfield
This could be a problem with your ORACLE_HOME and/or NLS_LANG environment variables. These need to be set for your user account running the web server BEFORE the web server is started. Don't try to set these in your php script or you'll get strange results. David Skyers wrote: > Hi > > I have a p

[PHP-DB] Re: populating multi-dimensional array

2007-04-11 Thread Roberto Mansfield
Matt Anderton wrote: > long-time reader, first-time poster. > > I am trying to use PEAR's 'hierselect' in HTML_Quickform. > A few things: 1. SQL style: avoid "SELECT *" and list your field names in the specific order you want them. What you have works, but you are assuming the field order in yo

Re: [PHP-DB] database password

2007-04-03 Thread Roberto Mansfield
Stut wrote: > Roberto Mansfield wrote: >> Bastien Koert wrote: >>> store your password/access credentials outside the web root and use php >>> to read the data in. >> >> This is good for web attacks, but I'm thinking of an account break in >> where

Re: [PHP-DB] database password

2007-04-03 Thread Roberto Mansfield
ose items in a > function and check the calling source to make sure its only your > application How would you do this? Thanks, Roberto >> From: Roberto Mansfield <[EMAIL PROTECTED]> >> To: php-db@lists.php.net >> Subject: [PHP-DB] database password >> Dat

[PHP-DB] database password

2007-04-03 Thread Roberto Mansfield
Howdy all, Just wondering what -- if anything -- people are doing to protect plaintext database passwords in their PHP scripts. Ultimately, PHP needs a plaintext password to create the database connection, so it seems that obfuscation is the best we can achieve on this front. While not really secu

[PHP-DB] Re: MySQL Foreign Key Issue

2007-03-26 Thread Roberto Mansfield
Are you using InnoDB for you tables? Lasitha Alawatta wrote: > Hello, > > > > I have 2 issue, regarding MySQL “Foreign Key”. > > I have two tables; > > Table 01 */CUSTOMER/* > > column name > > > > characteristic > > SID > > > > Primary Key > > Full_Name > > > >