Re: [PHP-DB] Table optimization ideas needed

2008-03-26 Thread Chris
Good idea. But I wonder whether calling the trigger each insert will loose any performance. It's going to affect things slightly but whether it'll be noticable only you can answer by testing. Another option I sometimes see is set up a replicated slave and run your reports off that instead of

Re: [PHP-DB] php + mysql + copy file

2008-04-02 Thread Chris
$carpeta = "subidos"; // nombre de la carpeta ya creada. chmool 777 (todos los permisos) copy($_FILES['file']['tmp_name'] , $carpeta . '/' . $_FILE ['file']['name']); It's $_FILES not $_FILE (an 's' on the end). It's always worth using error_reporting(E_ALL) and ini_set('d

Re: [PHP-DB] Verifying PostgreSQL Certficates

2008-04-13 Thread Chris
Angus B. Atkins-Trimnell wrote: Hello, I have been wondering if the resource object returned from a pg_connect() or pg_pconnect() call can be parsed for certain information. Specifically, I'm wondering if it contains information about the certificate and public key submitted by PostgreSQL wh

[PHP-DB] Re: [PHP] Writing MySQL Update Query with NULL value

2008-04-14 Thread Chris
Hi Bill, Please keep the replies on the list so others can provide their input and also learn. 2) You do need quotes around your data, plus you should use mysql_real_escape_string to stop sql injection attacks: Again, I'm using mysql_real_escape_string() in my code, just trying to focus o

Re: [PHP-DB] Generating random numbers

2008-04-16 Thread Chris
TG wrote: Is the most important thing to be random or to be unique? If you need unique, you can use a timestamp including microseconds. Maybe using something like microtime(): http://us.php.net/manual/en/function.microtime.php The only other way you're probably going to guarentee that you do

Re: [PHP-DB] playing longblob media

2008-04-27 Thread Chris
Philip Thompson wrote: On Apr 27, 2008, at 9:15 AM, Ron wrote: Hi, How can i retrieve via php a media stored in a mysql database as longblob? I'd like to be able to retrieve the media and stream it. TIA regards, ron Just like any other field type. Doesn't matter to PHP what the field ty

Re: [PHP-DB] Why $row is EMPTY

2008-04-29 Thread Chris
Nasreen Laghari wrote: Hi, Why my program is not going in while loop? When I run the same query in SQL cmd, it brings result but here when I print $result gives Resouce ID number means $result has data then why $row is empty. No, it means the query worked. If it wasn't a resource it would be

Re: [PHP-DB]problem in creating the ibm_db2 extension

2008-04-30 Thread Chris
H Thirividi wrote: > Hi All, > > I have installed db2 on my* fedora core 7* system and now i wan t to access > the database using the* php apis*. For this reason I downloaded the *ibm_db2 > 1.6* package and tried to create the extension. I did the following > > phpize > > output is > Configuring

[PHP-DB] Re: [PHP] Best practices for using MySQL index

2008-04-30 Thread Chris
>> Index on most integer fields only. Text fields can be indexed, but is not >> important when you design your DB well. >> >> Don't index just all integer fields. Keep track of the cardinality of a >> column. If you expect a field to have 100.000 records, but with only 500 >> distinct values it ha

Re: [PHP-DB] Query

2008-04-30 Thread Chris
Ron Piggott wrote: > I have an interesting question. > > When I run the following query through my PHP script it produces 1 > result. I know this because I echo the value of $num to the screen from > the following syntax: $num=mysql_numrows($result); > > When I do the query in the "SQL" tab of p

Re: [PHP-DB]problem in creating the ibm_db2 extension

2008-04-30 Thread Chris
H Thirividi wrote: > > > On Thu, May 1, 2008 at 5:53 AM, Chris <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > H Thirividi wrote: > > Hi All, > > > > I have installed db2 on my* fedora core 7* system and now i wan t >

Re: [PHP-DB] Timestamps

2008-05-01 Thread Chris
>> PS... Was it you, Jason, or someone else who asked about the security >> of the community knowing their database structure and I encouraged the >> use of `backticks` around all field and table names? > > Yeah it was me... Old habits die hard :) I'm working on converting > everything :) A litt

Re: [PHP-DB] Timestamps

2008-05-01 Thread Chris
Chris wrote: >>> PS... Was it you, Jason, or someone else who asked about the security >>> of the community knowing their database structure and I encouraged the >>> use of `backticks` around all field and table names? >> Yeah it was me... Old habits die

Re: [PHP-DB] Problems fopen like parameter

2008-05-06 Thread Chris
[EMAIL PROTECTED] wrote: > I am opening a rss file using fopen. > > If I use direct value, it can be opened, but I use a paremeter, I obtain > an error. > > > This works: > > ... > xml_set_character_data_handler($xml_parser, "characterData"); > $fp = fopen("http://www.arteglobal.net/news.

Re: [PHP-DB] synchronizing/replicating MySQL servers

2008-05-13 Thread Chris
Yves Sucaet wrote: > Hello, > > We have several PHP applications that run on the same server. We'd like to > split them up over two servers. Can somebody help me get started to set up a > replicated MySQL installation? I'd like to host the same DB on both machines, > and so when one updates the

Re: [PHP-DB] PHP 5.2.6 integrating MYSQL 5.0.51b on APACHE 2.0.63 + Windows XP SP2)

2008-05-13 Thread Chris
Jeff88 wrote: > Hi, > > Good Day! I have problem in getting the PHP 5.2.6 to integrate with MYSQL > 5.0.51b. I had done the following installations and configurations on > Windows XP (SP2): > > 1. Installed APACHE 2.0.63 - running fine > 2. Installed PHP 5.2.6 - running fine > 3. Configured httpd

Re: [PHP-DB] Saving an array to a mySQL table

2008-05-13 Thread Chris
Ron Piggott wrote: > I am writing a shopping cart. I am now ready to take the order from > being in a session variable > $_SESSION['product_selected'][$product_reference_number] to store it > into the orders table. > > While the products selected are being displayed in a loop I have the > piece

Re: [PHP-DB] explode () and mySQL query

2008-05-28 Thread Chris
Ron Piggott wrote: > I am trying to add a search feature to my shopping cart. > > I am wanting to use PHP to develop the query for mySQL. I have the > following code figured out: > > foreach(explode(" ", $keyword) as $key) $query .= " $key, "; I hope this isn't a copy/paste from your code as it

[PHP-DB] Re: explode () and mySQL query

2008-05-28 Thread Chris
Ron Piggott wrote: > I am not sure why this isn't bringing any results: > > WHERE shopping_cart_product.product_description IN ('straying') > > The word straying is in the midst of one of the descriptions. Ahh, oops - didn't notice that before. "IN()" looks for specific entries, so unless the

Re: [PHP-DB] Searching shopping cart

2008-05-28 Thread Chris
Ron Piggott wrote: > Someone referred me to: > > http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html > > Does this look like I am on the right track? > > Ron > > SELECT MATCH(shopping_cart_product.product_description, > shopping_cart_product.product_name) AGAINST ('$keyword') as Releva

Re: [PHP-DB] Searching shopping cart

2008-05-28 Thread Chris
Ron Piggott wrote: > I am getting the following error when running the query through php my > admin: > > MySQL said: Documentation > > #1191 - Can't find FULLTEXT index matching the column list Grr - stupid manual didn't have a link on how to create the index. http://dev.mysql.com/doc/refman/5.

Re: [PHP-DB] Searching shopping cart

2008-06-01 Thread Chris
> You can't create a multi-col full text index. You should only create it > on the long text field 'Course you can. mysql> create table a(a int, b varchar(50), c text); Query OK, 0 rows affected (0.01 sec) mysql> create fulltext index fulltext_bc on a(b,c); Query OK, 0 rows affected (0.01 sec)

Re: [PHP-DB] Searching shopping cart

2008-06-01 Thread Chris
> Would someone show me a sample query from the table? I have tried to > get this to work during the past half hour and I don't understand this > type of query yet. > > Where I am at with my search query that doesn't work is: > > SELECT MATCH ( 'product_description_search') AGAINST ( 'Jesus')

Re: [PHP-DB] explode () and mySQL query

2008-06-03 Thread Chris
Thodoris wrote: > O/H Ron Piggott ??: >> I am trying to add a search feature to my shopping cart. >> >> I am wanting to use PHP to develop the query for mySQL. I have the >> following code figured out: >> >> foreach(explode(" ", $keyword) as $key) $query .= " $key, "; >> >> This produces: >> >

Re: [PHP-DB] Navigation Help

2008-06-04 Thread Chris
> $result = safe_query("select count(*) FROM gig g, venue v WHERE g.gigName > LIKE '%".$gig_name."%' "); > $noEntries = mysql_num_rows($result); > $noPages = ceil($noEntries / $limit); $noEntries is always going to be 1 - there is a single row with the 'count' in it. What you probably want i

Re: [PHP-DB] Working with "time" data from MYSQL

2008-06-04 Thread Chris
Sebastian Hofferberth wrote: > Hi > > I have a MYSQL/PHP question for which I do not find an answer on the web. > > I have a MySQL table with a column of datatype "time". What I want to do is > read the values from this table but display the database entries plus 6 > hours. For example, when th

Re: [PHP-DB] PHP-MySQL connection for particular module

2008-06-17 Thread Chris
> It means that either your mysql conenction details are not correctly set or > the connection resource isn't accessible for your mysql functions. I suggest > you first try by replacing: > > $link = mysql_pconnect('localhost', 'root', 'testing'); > > into: > > mysql_pconnect('localhost', 'root'

Re: [PHP-DB] PHP-MySQL connection for particular module

2008-06-18 Thread Chris
Isaak Malik wrote: > Because then the connection resource isn't stored in the $link variable > and you will be able to use the mysql functions without passing that > variable to each function. RTM again. The link parameter is completely optional. If you don't specify it, it uses the last connect

Re: [PHP-DB] PHP-MySQL connection for particular module

2008-06-19 Thread Chris
> [new code] > if (!mysql_connect($a, $b, $c)) return; > > if (!mysql_select_db($dbname)) return; > > $res = mysql_query("SELECT * FROM manual;", $link); > [/new code] Isn't going to work because $link is not defined and definitely not a resource like mysql_query expects. > OR, optionally, to

Re: [PHP-DB] Apache crashes every time I call mysqli_fetch_assoc()

2008-07-09 Thread Chris
Bonger O wrote: > Hi, > > I have set up an environment on my Vista laptop comprising of Apache 2.2, > MySQL Server 5.1 and Php 5.2.5. > > I'm using a simple php program that I found in a PHP/SQL book. The PHP > program queries a MySQL table and traverses the results array of the query > and shoul

Re: [PHP-DB] Is this a good way of using PDO transactions?

2008-07-14 Thread Chris
> - If something goes wrong during the execution of the script I can be > practically sure that the database wasn't 'corrupted'. >>From a database point of view it should be like the script never started at >>all. Not 100% completely. I'm not sure about innodb but in postgresql, a "serial" datat

Re: [PHP-DB] Slow query

2008-07-23 Thread Chris
Steven Macintyre wrote: > Hi all, > > Below is the query we are getting a slow response on ... 2seconds ... > with 4 records we were hoping to get it much quicker. > > Can someone advise if i can optimise this? > > SELECT s.movie_id, m.movie_name, movie_shortname, image_name, > image_extension,

[PHP-DB] array_filter problem with 0's

2008-07-23 Thread Chris
echo $value; return $value; } } The echo prints out all the digits including the 0. But the $value_new are missing the 0's. I would appreciate it if some one can point me in the right direction Thanks in advance Chris -- PHP Database Mailing List (http://www.php.ne

Re: [PHP-DB] RE: [PHP] If Column Exists

2008-08-13 Thread Chris
Simcha wrote: You can try 'select `testcol` from `table`' and then check if you got a mysql_error(). If you do that, and the column exists, and there are 100,000 rows in there - you just selected 100,000 rows. Add a limit 1 to the end to only get one row. -- Postgresql & php tutorials http:

Re: [PHP-DB] int(1) and int(11)

2008-08-24 Thread Chris
Shelley wrote: Hi all, Is there any difference between int(1) and int(11) when creating a table? I checked the mysql manual and got that 1 and 11 are used to specify the display width of an column. Is there any other difference? Straight from the manual: The display width does not constrain

Re: [PHP-DB] Test connection to database

2008-08-26 Thread Chris
Jack van Zanen wrote: Hi I have written a little program that cycles through a list of databases and checks conectivity. it writes the status of this to a table now to check all 143 databases it takes about 50 seconds and I was wondering if this sounds about right to you guys. Across your ne

Re: [PHP-DB] Test connection to database

2008-08-27 Thread Chris
Jack van Zanen wrote: Databases are located in several datacentres throughout the area/country and we connect through dedicated lines not internet. I realize that there may be many factors to consider, I just would like to have the PHP experts have a look at my method/PHP code to check that t

Re: [PHP-DB] MySQL Reporting Tool

2008-09-04 Thread Chris
Micah Gersten wrote: Anyone use one, hopefully written in PHP? To report on what? Or you mean something like crystal reports where you can make up your own stuff? crystal reports supports odbc so will be able to hook into mysql. -- Postgresql & php tutorials http://www.designmagick.com/

Re: [PHP-DB] MySQL Reporting Tool

2008-09-04 Thread Chris
Micah Gersten wrote: Anything Open Source? One of my friends uses SQL Server Reporting Services and was wondering if there is a similar product for MySQL. Don't know any off hand but check out sourceforge. Here's a couple: http://sourceforge.net/projects/fourfive/ http://sourceforge.net/proje

Re: [PHP-DB] Building WHERE SQL clauses

2008-09-16 Thread Chris
Mike Sullivan wrote: Hi all thanks for the responses! What I have is a 6 table db that has each table created from the output of 6 identical laboratory machines (chico, harpo, ...). The out put is a text file which I import as a table named after the machine. I do realize that one solution is

Re: [PHP-DB] How to retrieve the position of a row inside a table with garbage data in all cloumns?

2008-09-22 Thread Chris
Trullo wrote: hello_world(); in fact.. how to goTo next/previous row of a table without using incremental ids AND without reading the whole table? i will explain: I wanna do something like a paging toolbar blinded to a list of rows (for example, a literally view of a db table). The first differe

Re: [PHP-DB] How to retrieve the position of a row inside a table with garbage data in all cloumns?

2008-09-22 Thread Chris
Jack van Zanen wrote: As a caution, I would never, ever use a query that relies on the data to be returned from the table in a certain order. That is just wrong and goes against the principals of a rdbms. I don't know that it goes against the principle, it's more that a database will nev

Re: [PHP-DB] How to retrieve the position of a row inside a table with garbage data in all cloumns?

2008-09-23 Thread Chris
Trullo wrote: On Tue, Sep 23, 2008 at 6:58 AM, Chris <[EMAIL PROTECTED]> wrote: To the OP: why does it matter where the row appears in the list? In the case i'm facing it doesn't matter, but it could be useful to display a scroll bar related to the size of the table and the r

Re: [PHP-DB] Bulk Insert from text file

2008-09-24 Thread Chris
Nasreen Laghari wrote: Hi All, I have bulk data store in text file, which is attached with this email. Attachments never come through to the php mailing list(s). If anyone asks for an attachment, place it somewhere on a website and provide a link. Could any 1 please help on how to insert u

Re: [PHP-DB] Insert a xml file into a DB

2008-09-24 Thread Chris
ERNESTO PENALOZA wrote: Hi there, I've been trying to insert (and retrieve) a xml file into a postgres DB into a BLOB field, using some nice examples downloaded from the net, but they don't seem to work. Is there a "standard" way to do this? I read about a bytea data type and run some examples,

Re: [PHP-DB] Insert a xml file into a DB

2008-09-24 Thread Chris
YVES SUCAET wrote: Why do you need to store the files in a database? Can't you just keep them on the hard disk and query them with DOM? Postgres provides searching of xml documents using xpath and other such functions: http://www.postgresql.org/docs/8.3/static/functions-xml.html#FUNCTIONS-

Re: [PHP-DB] query optimization

2008-09-25 Thread Chris
Micah Gersten wrote: What indices do you have? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com YVES SUCAET wrote: How could I rewrite the following query so it runs faster: select distinct location from blockunit where blockid in ( select bu.blockid fro

Re: [PHP-DB] query optimization

2008-09-25 Thread Chris
Jack van Zanen wrote: Hi If I am not mistaken, the second part of the union contains all rows that are in the first part of the union. just remove the first part. Kind of. The first part is a join, the second isn't. I was going to suggest rewriting the subquery into a single: where ip.block

Re: [PHP-DB] query optimization

2008-09-28 Thread Chris
Yves Sucaet wrote: Hi Jack, I'm expecting less than 10 records in the resulting set. The BlockUnit table contains 337,253 records; the InteractionParts table contains 279,953 records. It takes currently 8.3 seconds to execute the query as I have it. Erh, this is embarassing but I'm going to n

[PHP-DB] Re: [PHP] Re: [PHP-DB] Using oci_execute

2008-09-29 Thread Chris
Walter Galvão wrote: What version of PHP? *5* What version of Instant Client? * instantclient-basic-win32-10.2.0.3-20061115* What version of the DB? *10G * Are you exceeding the PHP script time out, or exceeding the memory limit? *I dont know. Doesnt appear any message. The script prints the la

Re: [PHP-DB] creating mysql functions using php

2008-10-08 Thread Chris
Andrew Martin wrote: Hello, Is it possible to create a mysql function from php, or is it command line only? $db = get_db(); $a = $db->query( "DELIMITER $$ " ); echo $db->error; // You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right

Re: [PHP-DB] mysql_numrows

2008-10-12 Thread Chris
Ron Piggott wrote: When I do the following command: $number_of_entries=mysql_numrows($blog_activity_result); and there are no rows I get an error (Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in ...) Fix the error from $blog_activity_result as someone else

Re: [PHP-DB] mysql_numrows

2008-10-14 Thread Chris
$num_rows = -1; if (!$result || mysql_err_no($result) != 0) { $num_rows = mysql_num_rows($result); } if ($num_rows >-1){ //do something here } Don't you have that backwards? If there is a result && there is no error, do the num_rows. if ($result && mysql_err_no($result) == 0) { $num_ro

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Chris
Piyush Kumar wrote: I'm using http://myclient.polarlava.com/ as web query interface for mysql server Now I want to add "Query Timeout" functionality to it For that I need to get the PID for last ran mysql query and then using kill PID - I can kill the process on MySQL server Please explain how

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Chris
Piyush Kumar wrote: Hi Chris, As I mentioned in my query I want to Kill only the query ran by web client not all queries running on the server. The perl script kill all queries - which are been running from for last 120(or any threshold set) Issues: How do I get the PID of my last select

Re: [PHP-DB] MySQL Query Timeout program in PHP

2008-10-15 Thread Chris
Piyush Kumar wrote: show full processlist ; gives me whole query -- but I want some php function -- like mysql_info() -- to return the PID of last run query Please do not email me directly. Always send to the mailing list. If it's not listed under php.net/mysql somewhere, then it's not availa

[PHP-DB] oci driver performance

2008-10-16 Thread Chris
Hi all, Using php 5.2.6 + oci driver 1.3.4 from pecl Has anyone had any issues with the oci8 driver performance? I'm doing some profiling using xdebug and all of the time seems to be spent in oci_execute and oci_fetch_array. This shows up when I use jmeter to hit the app pretty hard. The da

Re: [PHP-DB] mysql_select_db

2008-10-21 Thread Chris
Stan wrote: So ... if I enter "mysql -h mysqlServer -u stan -p" and then enter the password, I get connected without a problem ... I get the mysql client prompt. You haven't selected a db. Inside mysql: use database_name; And the mysql_connect() statement in my code does not "die". But th

Re: [PHP-DB] using database without mysql installed

2008-10-26 Thread Chris
Patrick Price wrote: I am trying to access a mysql database server from a php 5.2 server that doesn't have mysql installed on it. I don't have access or the ability to reinstall php on this server. Is it possible to install mysql after php is installed and up and running? Of course. php ju

Re: [PHP-DB] Help needed - SELECT query optimization

2008-10-26 Thread Chris
It should be a rapidshare links database (which updates with a PHP crawler I wroted last Saturday). I would like to change the snippet to title and add another column for the snippet, My main queries are INSERT's - a big insert (usually 10-100 links per insert) in each hour. My crawler is checki

Re: [PHP-DB] MYSQL_SOCkET vs. mysql.default_socket

2008-10-28 Thread Chris
Hermann Giebels wrote: Hello, phpinfo shows two values for the socket location of mysql. One is called MYSQL_SOCKET, the other one, which I can define in the php.ini, is called mysql.default_socket. Now I wonder where the first comes from and where or how to manipulate this. And what is the

Re: [PHP-DB] PDO bindValue ORDER BY

2008-11-02 Thread Chris
Matthew Peltzer wrote: ok... this makes more sense now. I know in the past I tried to do something similar with table names in the WHERE clause, and that didn't work in the same manner. Is there a better way to do what I'm trying to do? that is, sorting within the SQL statement based on a suppl

Re: [PHP-DB] PDO bindValue ORDER BY

2008-11-02 Thread Chris
Chris wrote: Matthew Peltzer wrote: ok... this makes more sense now. I know in the past I tried to do something similar with table names in the WHERE clause, and that didn't work in the same manner. Is there a better way to do what I'm trying to do? that is, sorting within the SQL

Re: [PHP-DB] PHP4, mssql_* and SQL Server 2005

2008-11-04 Thread Chris
Weaver Hickerson wrote: Greetings to the group. We have a PHP4 application that we moved to SQL server 2005 from SQL server 2000. Everything seems to work fine except for so far we have found 2 queries that "break". Pointing back to the SQL Server 2000 server, they work fine again. If it'

Re: [PHP-DB] PHP4, mssql_* and SQL Server 2005

2008-11-04 Thread Chris
Please always cc the mailing list so others can offer extra advice/suggestions etc. Weaver Hickerson wrote: they work in query analyzer. ok so the queries aren't the problem. do you get an error? what is it? Might need to play with these settings: http://www.php.net/manual/en/function.mssq

Re: [PHP-DB] PHP4, mssql_* and SQL Server 2005

2008-11-04 Thread Chris
Chris wrote: Please always cc the mailing list so others can offer extra advice/suggestions etc. Weaver Hickerson wrote: they work in query analyzer. ok so the queries aren't the problem. do you get an error? what is it? Might need to play with these settings: http://www.php.net/m

Re: [PHP-DB] INNER JOIN query

2008-11-04 Thread Chris
Ron Piggott wrote: I am writing a blog application. Table blog has the blog entries Table blog_owners is the user profiles Table blog_responses is responses to the blog entries I am writing the module where the user approves or deletes user comments when the blog entry is in 'moderated' mode.

Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related?

2008-11-05 Thread Chris
UPDATE jos_content SET hits = ( hits + 1 ) WHERE id='123' The log says this took 7 seconds. There's an index on "id". There are only 400 or so records in the whole table. It's not like there are a million records and no index. Is there ANY rational reason this query would EVER take 7 sec

Re: [PHP-DB] Joomla MySQL query performance affected by anything non-server related?

2008-11-05 Thread Chris
TG wrote: Thanks for the response, Chris. I have analyzed, optimized, checked, etc. Everything looks relatively good/healthy on the server side of things. It is MyISAM. That's one thing I don't really know very well, the benefits of the different DB engines. Not sure if I

Re: [PHP-DB] Building additional modules after installing core modules

2008-11-09 Thread Chris
Baskara wrote: I decided to install php from source. I have installed the core modules only. Is that possible to install additional modules ?such as, gd, ming bcmath etc?after installing php core modules without compiling the entire source code? Please don't reply to someone elses thread with s

Re: [PHP-DB] Site Map and Page-o-mation

2008-11-12 Thread Chris
Ron Piggott wrote: I need help with a site map I am making using PHP. The site map is of an online photo gallery. In the code below I am trying to determine the value for the photo theme (category) thumbnail image pages. Each of the photo theme (category) pages may display up to 18 thumbnail i

Re: [PHP-DB] Site Map and Page-o-mation

2008-11-12 Thread Chris
rence = photo_gallery_category.reference WHERE photo_gallery_category.category_name = '$photo_gallery_category' ORDER BY photo_gallery_index.filename ASC LIMIT " . ( ($page*18) -18) . " , 18 I see where you are coming from Chris. What I need to know is from the 18 images which has th

Re: [PHP-DB] Copying Data From One Table To Another Table

2008-11-13 Thread Chris
Alice Wei wrote: Hi, I am trying to accomplish a task of which I have to copy the data from one table to another. The problem is that whenever I tried to perform the action of copying the data through this method, although the data gets copied, it performs reiterative copying that causes my

Re: [PHP-DB] Re: PostgreSQL pg_query_params, PHP locales, and double data types

2008-11-16 Thread Chris
Alec Smecher wrote: Hi all, If you'll excuse my persistence, I'm still wondering about this issue. Is there a better place to go for feedback, or someone I can contact directly? You'll have to join the -internals list if you want to discuss. The -general, -db (and other) lists are only 'use

Re: [PHP-DB] trying to get pecl and phpize to build oci8

2008-11-16 Thread Chris
Fred Silsbee wrote: I have Fedoara 2.6.27.5-37.fc9.i686 that has perl: This is perl, v5.10.0 built for i386-linux-thread-multi I searched the entire system and found neither pecl or phpize Chris told you - you have to install the php-devel package to get it (and whatever other dependencies

Re: [PHP-DB] oci_connect still not working...I added a debug statement

2008-11-17 Thread Chris
oci_internal_debug(1); // turn on tracing // Create a database connection // $conn = oci_connect("hr", "hr", "//dwlin165.us.oracle.com/lmkiiiGDNSID"); That definitely won't work.. // $conn = oci_connect('hr', 'hr',$db); try oci_connect('hr', 'hr', '//localhost/xe'); I assume you unlock

Re: [PHP-DB] what sets the ORACLE_HOME variable and sets PHP/Apache environment

2008-11-18 Thread Chris
Fred Silsbee wrote: oci8 OCI8 Supportenabled Version 1.3.4 Revision$Revision: 1.269.2.16.2.38.2.20 $ Active Persistent Connections 0 Active Connections 0 Compile-time ORACLE_HOMEno value < /etc/apache2/envvars (or /etc/httpd/envva

Re: [PHP-DB] what sets the ORACLE_HOME variable and sets PHP/Apache environment

2008-11-18 Thread Chris
Fred Silsbee wrote: there is a file /etc/httpd/conf/httpd.conf I tried putting the ORACLE_HOME in this file but it failed How did you put it in? Try this method http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Datab

Re: [PHP-DB] what sets the ORACLE_HOME variable and sets PHP/Apache environment

2008-11-18 Thread Chris
Fred Silsbee wrote: didn't work...sorry errors: OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/tmp/oci8/oci8.c:1819) OCI8 DEBUG L1: Got NO cached connection at (/tmp/oci8/oci8.c:1864) OCI8 DEBUG: OCIEnvNlsCreate at (/tmp/oci8/oci8.c:2768) OCI8 DEBUG L1: create_spool: (0) at (/tmp/oci8/oci8.c:26

Re: [PHP-DB] PHP MySQL Driver Choice -- Fastest?

2008-11-19 Thread Chris
Micah Gersten wrote: Which is the fastest driver for this? ADODB PDO mysqli Either mysqli or pdo since they'd deal with the mysql client directly. ADODB is a php library, so it's not going to be as fast because you have php code overhead. -- Postgresql & php tutorials http://www.designmagic

Re: [PHP-DB] PHP MySQL Driver Choice -- Fastest?

2008-11-19 Thread Chris
Micah Gersten wrote: Chris wrote: Micah Gersten wrote: Which is the fastest driver for this? ADODB PDO mysqli Either mysqli or pdo since they'd deal with the mysql client directly. ADODB is a php library, so it's not going to be as fast because you have php code overhead.

Re: [PHP-DB] PHP MySQL Driver Choice -- Fastest?

2008-11-19 Thread Chris
YVES SUCAET wrote: How does the "default" php_mysql.dll compare to these? Is mysqli faster than mysql? I'd call that a native driver. No idea about mysqli vs mysql. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] PHP MySQL Driver Choice -- Fastest?

2008-11-19 Thread Chris
Micah Gersten wrote: Chris wrote: Micah Gersten wrote: Chris wrote: Micah Gersten wrote: Which is the fastest driver for this? ADODB PDO mysqli Either mysqli or pdo since they'd deal with the mysql client directly. ADODB is a php library, so it's not going to be as fast becaus

Re: [PHP-DB] php script to automate the loading of gpx/shp to postgres using ogr2ogr

2008-11-20 Thread Chris
S.Reena wrote: Hi All, I want to automate the conversion of gpx/shp file to postgres database..as when user uploads the file to a specified folder...ogr2ogr command is activated to convert gpx to postgres Can any1 suggest some script or something for this (using php ) ...Also whether OGR/PHP

Re: [PHP-DB] php5/oci8/oracle 11g1 insert doesn't work

2008-11-23 Thread Chris
Fred Silsbee wrote: The following code doesn't do the insert. As is the connect message doesn't show. I've tried the insert statement in a session: [EMAIL PROTECTED] log_book]$ sqlplus landon/rumprocella SQL*Plus: Release 11.1.0.6.0 - Production on Sat Nov 22 16:01:39 2008 Copyright (c) 1982

Re: [PHP-DB] php5/oci8/oracle 11g1 insert doesn't work

2008-11-23 Thread Chris
Fred Silsbee wrote: --- On Sun, 11/23/08, Chris <[EMAIL PROTECTED]> wrote: From: Chris <[EMAIL PROTECTED]> Subject: Re: [PHP-DB] php5/oci8/oracle 11g1 insert doesn't work To: [EMAIL PROTECTED] Cc: php-db@lists.php.net Date: Sunday, November 23, 2008, 9:43 PM Fred Si

Re: [PHP-DB] php5/oci8/oracle 11g1 insert doesn't work

2008-11-23 Thread Chris
PHP Parse error: syntax error, unexpected T_LNUMBER in try_logid.php on line 21 Errors parsing try_logid.php You have a parse error. PHP cannot work out what to do in the file. It's a fatal error. It's because on line 21 (like the message says) you are using single quotes for in & out of th

Re: [PHP-DB] works under mysql 5 but not under Oracle 11g1

2008-11-23 Thread Chris
Fred Silsbee wrote: while ($newArray = oci_fetch_assoc($result)) { foreach ($fields as $field){ ${$field} = $newArray[$field];// values not making it into variable } print_r($newArray);

Re: [PHP-DB] Unable to Login to Oracle 9i-R2 Database Using PHP 5.2.5

2008-11-24 Thread Chris
//Return the database connection OCILogon($username, $passwd, $db); I receive an error stating, "Fatal error: Call to undefined function OCILogon() in C:\Documents and Settings\afortuno\My Documents\Dev\DBAIntranet\ghr_resources\transaction_report\adam.php on line 7" The error message coul

Re: [PHP-DB] works under mysql 5 but not under Oracle 11g1

2008-11-24 Thread Chris
fixed the problem but am not fully sure of the optimum code one should use! I like the association idea but must change the $fields array There is a better way than using count! 67 //get log_book_id table information 68 $user = "select * from log_book_id"; 69 $result = oci

Re: [PHP-DB] Unable to Login to Oracle 9i-R2 Database Using PHP 5.2.5

2008-11-24 Thread Chris
Rick, when I delve into the php_info() shmaz, I see this snipet - see below. I'm not sure if I should be looking for something else or not. Try doing this from a web page. Maybe it has a different php.ini or something. Anything in the IIS error log (probably goes to the windows logs) ? --

Re: [PHP-DB] works under mysql 5 but not under Oracle 11g1

2008-11-24 Thread Chris
Array ( [LOG_ID] => 405 [FDATE] => 15-JUL-01 [ACTYPE] => C172 [ACID] => N17SJ [NLANDINGS] => 1 [NHOURS] => 1.2 ) So everything is uppercase where you're expecting lower case. while ($newArray = oci_fetch_assoc($result)) { foreach ($fields as $field){ $field = strtoupper($field);

Re: Fwd: [PHP-DB] MySQLi not closing connections

2008-11-25 Thread Chris
I have never written an application using persistent connections, but I did get hired at a company where the other programmers describe the same problem you're having (a proliferation of connections that overwhelmed the server). They blamed mysql_pconnect() and the lead programmer said that aft

Re: Fwd: [PHP-DB] MySQLi connections

2008-11-25 Thread Chris
J. Hill wrote: Reading the thread on mysqli connection issues, I am curious if anyone knows of a downside to creating a connection from a configuration page and using it as a global in all functions? Good way to do it. You create the connection at the start and use the same thing throughout t

Re: Fwd: Fwd: [PHP-DB] MySQLi connections

2008-11-26 Thread Chris
Fergus Gibson wrote: -- Forwarded message -- From: Fergus Gibson <[EMAIL PROTECTED]> Date: Wed, Nov 26, 2008 at 11:55 AM Subject: Re: Fwd: [PHP-DB] MySQLi connections To: "J. Hill" <[EMAIL PROTECTED]> On Tue, Nov 25, 2008 at 3:12 PM, J. Hill <[EMAIL PROTECTED]> wrote: I am used

Re: [PHP-DB] Bug in interbase.c (Ver. 5.2.6) INVALID BLOB ID

2008-11-27 Thread Chris
Benjamin Schwarze wrote: Hi! Ay many other users recognized, there is a bug in the implementation of the function "_php_ibase_quad_to_string". (imho since version 5.2.1) The line "spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd);" doesnt work as estimated

Re: [PHP-DB] oracle pooling

2008-11-30 Thread Chris
Themis Vassiliadis wrote: Hi guys, I'm newer on this list. I'm looking for a extension to establish a connection pooling between server and oracle database. You could try sqlrelay (it has a php extension). Otherwise, 11g has connection pooling built in to oracle. For versions before that, th

Re: [PHP-DB] oracle pooling

2008-12-01 Thread Chris
Themis Vassiliadis wrote: You are right but sqlrelay doesn't work on Windows plataform and the only possible solution from oracle to connect PHP using pooling is DRCP, just on 11G, but as far as I know it hasn't been implemented integrated with PHP. All you have to do is change your TNS entry

Re: [PHP-DB] oracle pooling

2008-12-03 Thread Chris
DRCP is really a big improvement. But for me it has a great holdback: the pool controlled in the server side isn't defined for a specific schema, so if we have an application server serving different connections demanding different credentials certainly the performance will be worse. Another

Re: [PHP-DB] MySQL Conditional Trigger

2008-12-08 Thread Chris
anything compared to NULL is always false Actually it's null. mysql> select false = null; +--+ | false = null | +--+ | NULL | +--+ 1 row in set (0.01 sec) mysql> select 1 = null; +--+ | 1 = null | +--+ | NULL | +--+ 1 ro

<    1   2   3   4   5   6   7   8   9   10   >