Re: [PHP-DB] DB interface problem

2009-10-28 Thread Samuel ROZE
Why not using PDO ? It is a global and standardized method to access to data. :-) 2009/10/27 Giff Hammar gham...@sv-phoenix.com: I started having trouble with a DBI interface to my PostgreSQL database after I built a new Ubuntu machine. The Postgres version is 8.3 and the DBI was written

Re: [PHP-DB] Need help in triggers

2009-10-05 Thread Samuel ROZE
What are you really want to do ? This is an exemple: CREATE FUNCTION myfunction () RETURNS trigger AS $$ BEGIN NEW.update_date = 'now'::date; RETURN NEW; END; $$ LANGUAGE plpgsql; CREATE TRIGGER set_update_date AFTER INSERT ON matable FOR EACH ROW EXECUTE PROCEDURE myfunction();

Re: [PHP-DB] PDO and PostgreSQL - RAISE NOTICE

2009-10-05 Thread Samuel ROZE
me... :-) Thanks Lester ! Samuel. Le lundi 05 octobre 2009 à 08:36 +0100, Lester Caine a écrit : Samuel ROZE wrote: Hi, Thanks for your reply. In fact, my request returns a result which i get with the fetch method. But, it must returns other informations, which are not in the result

[PHP-DB] PDO PgSQL: _pdo_pgsql_notice

2009-10-05 Thread Samuel ROZE
? I view that there's only a pdo_dbh_t param, I may just store this message into a field of the PDO class ? Thanks in advance. Samuel. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] PDO PgSQL: _pdo_pgsql_notice

2009-10-05 Thread Samuel ROZE
! Samuel. (French) Le lundi 05 octobre 2009 à 20:58 +0200, Samuel ROZE a écrit : Hi ! I'm reading the source of PDO PostgreSQL driver and i see that there's an empty function, _pdo_pgsql_notice, which is very interesting ! I think that it is used when PostgreSQL throw Notices. But, nothing is done

[PHP-DB] PDO and PostgreSQL - RAISE NOTICE

2009-10-04 Thread Samuel ROZE
]= string(34) SELECT * FROM public.test_info() } -- Is there someone who know how I can get that ? I read some thinks about that and pg_last_notice may returns the NOTICE, but with PDO ? Thanks ! Samuel (French). -- PHP Database Mailing List (http

Re: [PHP-DB] PDO and PostgreSQL - RAISE NOTICE

2009-10-04 Thread Samuel ROZE
Hi, Thanks for your reply. In fact, my request returns a result which i get with the fetch method. But, it must returns other informations, which are not in the result... This informations are neturned before the result in console... So, i don't know how I can get that. Samuel. Le lundi 05

Re: [PHP-DB] preg_math vs preg_match_all

2004-11-23 Thread Gerard Samuel
Yemi Obembe wrote: Just want to know the difference between preg_match and preg_match_all. preg_match stops after the first match. preg_match_all gets *all* the matches. E.g. If you have a string - $str = foofoo; preg_match('/foo/', $str, $match); - $match will have an array with one foo.

Re: [PHP-DB] mysqli prepared statement query result sets

2004-10-26 Thread Gerard Samuel
Norland, Martin wrote: The functions you want exist in php5, if that's an option: http://us2.php.net/manual/en/ref.mysqli.php - http://us2.php.net/manual/en/function.mysqli-fetch-assoc.php No this is not an option. mysqli_fetch_* needs a result resource id to work. mysqli statement functions

Re: [PHP-DB] mysqli prepared statement query result sets

2004-10-25 Thread Gerard Samuel
Hans Lellelid wrote: Hi, I'm writing a db abstraction layer driver for MySQLi. I'm glad to finally get a chance to play around with these new functions, but am completely stumped by this question: Is there no way to get back a standard resultset when using prepared statement queries? I can't

Re: [PHP-DB] INNO tables - will I have problems?

2004-10-13 Thread Gerard Samuel
Julian Madle wrote: I obviously have no control of which ISP and end-user may choose, although our product will specify that Linux, PHP4, and MySQL4 (or higher) are installed. The manual says that these are built-in on version 4.0 and above - I just need real-world confirmation from people with

Re: [PHP-DB] INNO tables - will I have problems?

2004-10-13 Thread Gerard Samuel
[EMAIL PROTECTED] wrote: If the minimum requirement of mysql is version 4, then you will have no problems, as INNODB is the default type in mysql 4.x.x -- InnoDB is included by default in mysql 4 but the default is still MyISM. I looked over the manual, and I believe that you are correct. The

[PHP-DB] One to Many Select Statement

2004-09-12 Thread Gerard Samuel
Looking for clarification... Say that I have a user table and group table - -- user table -- id username 1 foo -- group table -- id user_id group_name 1 1group_1 2 1group_2 Would this be the proper way to construct a select statement for this - select u.username,

Re: [PHP-DB] One to Many Select Statement

2004-09-12 Thread Gerard Samuel
John Holmes wrote: Gerard Samuel wrote: Looking for clarification... Say that I have a user table and group table - -- user table -- id username 1 foo -- group table -- id user_id group_name 1 1group_1 2 1group_2 Would this be the proper way to construct a select statement

[PHP-DB] Space requirements (with respect to foriegn languages)

2004-08-26 Thread Gerard Samuel
My site/code/database is developed primarily for the english language. I've had people from The Far East add content to my site using their native language, and it is displaying properly in the site. But Im a bit concerned about the number of characters these languages use. For example, I've had

Re: [PHP-DB] IBM DB2

2004-08-20 Thread Gerard Samuel
Robert Twitty wrote: On Thu, 19 Aug 2004, Gerard Samuel wrote: Robert Twitty wrote: Hi Is anyone using PHP to connect to an IBM DB2 database? The reason why I am asking is becaouse I want to see if the odbtp extension can be used to successfully prepare and execute DB2 stored procedures. So far

Re: [PHP-DB] IBM DB2

2004-08-19 Thread Gerard Samuel
Robert Twitty wrote: Hi Is anyone using PHP to connect to an IBM DB2 database? The reason why I am asking is becaouse I want to see if the odbtp extension can be used to successfully prepare and execute DB2 stored procedures. So far, ODBTP performs quite well with IBM DB2 in regards to regular

Re: [PHP-DB] DB2 +Windows +CLOB

2004-08-03 Thread Gerard Samuel
On Tuesday 03 August 2004 09:02 am, Robert Twitty wrote: The odbtp extension has be used quite successfully with DB2. You can get it at http://odbtp.sourceforge.net. I have not personnally used it with DB2, but there are posts on odbtp's help forum pertaining to DB2. -- bob On Tue, 3 Aug

[PHP-DB] Prepared statements via mssql extension

2004-06-28 Thread Gerard Samuel
Is it possible? Just checking... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] SQL injection prepared statements

2004-06-25 Thread Gerard Samuel
Just looking for opinions on sql injection while using prepared statements. I've read at the oci8 extention that content should not be escaped --- Do not use magic_quotes_gpc or addslashes() and oci_bind_by_name() simultaneously as no quoting is needed and any magically applied quotes will be

Re: [PHP-DB] Re: SQL injection prepared statements

2004-06-25 Thread Gerard Samuel
On Friday 25 June 2004 01:03 pm, Hans_L wrote: Gerard Samuel wrote: snip So Im guessing that this is how prepared statements are done on other databases. After being trained to do it one way (always escaping bad content), Im being shown to do it the other way, and Im looking for any

[PHP-DB] Re: [sqlite] Re:SQLite ODBC Driver

2004-06-02 Thread Gerard Samuel
On Wednesday 02 June 2004 02:55 am, David Morel wrote: What do you mean? SQLite installation is the simplest thing ever! Change your ISP. Go for a real hosting service. They sound like they *dont* know how to install it, and *dont* even want to try. -- PHP Database Mailing List

[PHP-DB] Using Cursors

2004-06-01 Thread Gerard Samuel
A bit off topic, but lately I've been running into situations, where I have to know about using cursors with databases, like sql server, ibm db2 Can anyone point me to online resources that explains (to a practical newbie) cursors Thanks -- PHP Database Mailing List (http://www.php.net/)

[PHP-DB] [Attn] Re: [PHP-DB] SQLite behaving bad?

2004-02-18 Thread Gerard Samuel
On Tuesday 17 February 2004 04:41 pm, Gerard Samuel wrote: Currently using sqlite 2.8.11 (distributed by php snaps) with php4.3.5rc2 on windows XP. Several months ago, I added support for sqlite in a database abstraction class I created. It worked great then. Im trying to see if things

Re: [PHP-DB] chmod on win xp

2004-01-17 Thread Gerard Samuel
On Saturday 17 January 2004 03:17 pm, mayo wrote: so I would like to write to file on my local box. I've looked but I don't see how to chmod. using: windows xp and iis 5 -- gil 1. This is the Database list, stuff like this should go in the General List. 2. chmod only applies to *nix

Re: [PHP-DB] pg_result_error()

2003-12-12 Thread Gerard Samuel
Im going to CC this to the PostgreSQL list also. On Friday 12 December 2003 06:44 am, Martin Marques wrote: El Vie 12 Dic 2003 00:09, Gerard Samuel escribió: What good is this function? A quick example of the wall Im running into - $sql = 'INSERT INTO .'; $result = pg_query($conn_id

[PHP-DB] Re: [PHP] [PHP-DB] pg_result_error()

2003-12-12 Thread Gerard Samuel
On Friday 12 December 2003 10:24 am, Martin Marques wrote: That is fine and all, but my original example was just an example of the non functionality of pg_result_error(), not how to handle errors when a query fails. But for arguement sake, lets use your example in some dummy code[0].

[PHP-DB] pg_result_error()

2003-12-11 Thread Gerard Samuel
What good is this function? A quick example of the wall Im running into - $sql = 'INSERT INTO .'; $result = pg_query($conn_id, $sql); if ($result === false) { var_dump( pg_result_error( $result ) ); } According to the manual, pg_result_error takes the result resource. If that resource is

Re: [PHP-DB] PostgreSQL

2003-11-24 Thread Gerard Samuel
On Monday 24 November 2003 10:58 am, David Kendal wrote: Hello! I'm new to to Postgre so excuse me, but is Postgre the same as MySQL? Yes and No. Both are databases. Both can be interfaced to php. But Under the hoods of both, are very different. For more information, http://www.mysql.com/

[PHP-DB] Re: [PHP] RE: [PHP-DB] Re: [PHP] SQLITE

2003-11-22 Thread Gerard Samuel
On Saturday 22 November 2003 06:43 pm, Bronislav Klucka wrote: It's realy just benchmark I've done. I'm pretty much aware of system sqlite is useing to store the data, and I also find obvious that if it would be runnig like web database module, users will ask the same table ata the same time

Re: [PHP-DB] Strange bahavior with mysql_fetch_array($result)

2003-11-20 Thread Gerard Samuel
On Thursday 20 November 2003 08:54 pm, Evan Panagiotopoulos wrote: I am searching a table and have the following php code with my comments: $result = mysql_query($query); print The result == $result; // it returns The result == Resource id #2 if (!mysql_fetch_array($result)) { ... } else

[PHP-DB] sybase_connect(): Sybase: Unable to allocate connection record problem

2003-11-17 Thread samuel
(): Sybase: Unable to allocate connection record in /usr/local/apache2/htdocs/test.php on line 3 I search all the internet, don't find the reason and the solution. Help, Help me. Thanks a lot. Samuel -- PHP Database Mailing List (http://www.php.net

[PHP-DB] IBM DB2 and php

2003-10-19 Thread Gerard Samuel
Maybe in early August, I got my code to work with DB2 8.1.3 via ODBC after a bit of teeth pulling. I played with it for about 2-3 weeks, and it seemed ok (slow but ok). Earlier this past week, I was modifying the DB drivers for my script, and now, DB2 refuses to cooperate. I don't remember

Re: [PHP-DB] IBM DB2 and php

2003-10-19 Thread Gerard Samuel
Gerard Samuel wrote: example script |?php ||// contains db connection stuff| |include('include.php'); // body is a text field $sql = 'select id, user_id, name, time, body, ip from NULLID.guestbook for read only'; $result = odbc_exec($db-_connection_id, $sql); odbc_longreadlen($result, 0

Re: [PHP-DB] Re: IBM DB2 PHP 4.3.2 behaviour

2003-08-20 Thread Gerard Samuel
;) Gerard Samuel [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] For the most part, I got my code running with IBM DB2 8.1.3 But its slower than dirt. Maybe 1 out of 10 times, a page would exceed the 30 second time limit. I understand on a fresh database startup, it takes time

[PHP-DB] IBM DB2 PHP 4.3.2 behaviour

2003-08-19 Thread Gerard Samuel
For the most part, I got my code running with IBM DB2 8.1.3 But its slower than dirt. Maybe 1 out of 10 times, a page would exceed the 30 second time limit. I understand on a fresh database startup, it takes time to get things together to run. But sometimes it would seem like its going fast,

Re: [PHP-DB] IBM DB2 PHP 4.3.2 behaviour

2003-08-19 Thread Gerard Samuel
Matt Schroebel wrote: Gerard Samuel mailto:[EMAIL PROTECTED] wrote on Tuesday, August 19, 2003 2:32 PM: understand on a fresh database startup, it takes time to get things together to run. But sometimes it would seem like its going fast, then othertimes, crawl slower than snails. I've found

Re: [PHP-DB] ODBC Database

2003-08-14 Thread Gerard Samuel
Robert Twitty wrote: Unless I am mistaken, but isn't there an ODBC driver available for MySQL called MyODBC? -- bob I haven't a clue. Ill look, maybe it will help me create drivers for my DB layer, as I already know MySQL. Last night I successfully connected to IBM's DB2, but I didnt get far

Re: [PHP-DB] ODBC Database

2003-08-14 Thread Gerard Samuel
Larry E.Ullman wrote: Im looking at venturing into working with PHP's ODBC extention. Does anyone have any recommendations as to a Database, that is easy to understand/get into from a novice point of view, that installs on windows 2k, and is free? MySQL is kind of free, installs on W2K and is

[PHP-DB] DB2 and php serialized data

2003-08-14 Thread Gerard Samuel
Most likely its not a PHP issue, but looking to see if anyone has run into this. I've inserted a serialized string, into a CLOB column. Trying to retrieve the column returns no results. If anyone has any DB2 experience, I'd be grateful if I can bounce a few questions to you offlist. Thanks for

[PHP-DB] PHP/DB2

2003-08-14 Thread Gerard Samuel
I started playing with DB2 earlier this week. And come to find out that it creates table names/columns in UPPER case. Does anyone have any experience using DB2 in a cross platform manner, with other dbs such as MySQL? Just looking for ideas, as I've run out of them... Thanks -- PHP Database

Re: [PHP-DB] DB2 and php serialized data

2003-08-14 Thread Gerard Samuel
Gerard Samuel wrote: Most likely its not a PHP issue, but looking to see if anyone has run into this. I've inserted a serialized string, into a CLOB column. Trying to retrieve the column returns no results. If anyone has any DB2 experience, I'd be grateful if I can bounce a few questions

Re: [PHP-DB] PHP/DB2

2003-08-14 Thread Gerard Samuel
Ok, I figured out my problem. It wasn't the table names in UPPER case, but the unique id that prepended to the table names that was missing. Gerard Samuel wrote: I started playing with DB2 earlier this week. And come to find out that it creates table names/columns in UPPER case. Does anyone have

Re: [PHP-DB] ODBC Database

2003-08-11 Thread Gerard Samuel
[EMAIL PROTECTED] wrote: whoops, meant to include thishttp://www.mysql.com/downloads/api-myodbc-3.51.html Unless I am mistaken, but isn't there an ODBC driver available for MySQL called MyODBC? -- bob I haven't a clue. Ill look, maybe it will help me create drivers for my DB

[PHP-DB] ODBC Database

2003-08-11 Thread Gerard Samuel
Im looking at venturing into working with PHP's ODBC extention. Does anyone have any recommendations as to a Database, that is easy to understand/get into from a novice point of view, that installs on windows 2k, and is free? Thanks for your suggestions. -- PHP Database Mailing List

[PHP-DB] SQLite

2003-07-05 Thread Gerard Samuel
With respect to the PHP manual, are there any documentation to using this extention? Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Rand() Emulation

2003-06-24 Thread Gerard Samuel
Im trying to figure out a way to emulate mysql's RAND() function to be cross database compatible via php. Has anyone done anything similar to this??? Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Rand() Emulation

2003-06-24 Thread Gerard Samuel
Doesn't really cut it when you do not know a min and max value, or want to extract a random range of numbers. Becoming Digital wrote: Im trying to figure out a way to emulate mysql's RAND() function to be cross database compatible via php. Has anyone done anything similar to this??? How

Re: [PHP-DB] Rand() Emulation

2003-06-24 Thread Gerard Samuel
Im probably not making myself clear. Ultimately, my goal is to emulate mysql's - SELECT * FROM TABLE ORDER BY RAND() LIMIT (X) for other databases that do not support RAND(). So using variations of php's rand(), wouldn't make sense, as it only picks one value out of a range of values, that are

Re: [PHP-DB] Rand() Emulation

2003-06-24 Thread Gerard Samuel
Yes its more than possible to do as you suggested, but as you implied, not very friendly, when it comes to large result sets... Roedel, Mark wrote: Might it be simpler, since you're assuming the presence of PHP anyway, to just read your entire result set into an array and then shuffle() it and

Re: [PHP-DB] Rand() Emulation

2003-06-24 Thread Gerard Samuel
Becoming Digital wrote: Ultimately, my goal is to emulate mysql's - SELECT * FROM TABLE ORDER BY RAND() LIMIT (X) for other databases that do not support RAND(). Which are those? Currently mySQL, PostgreSQL, and MSSQL. To me the idea above would work, but it hinges on if that rand

Re: [PHP-DB] Creating/Populating DB

2003-06-18 Thread Gerard Samuel
[EMAIL PROTECTED] wrote: This should be as simple as a PHP script that opens a connection to the destination server (with rights to do all actions you mentioned).. Opens a text file with all the SQL commands you want to issue, and starts firing them off at the server 1 by 1... Once you create the

[PHP-DB] Creating/Populating DB

2003-06-17 Thread Gerard Samuel
Im trying to make an install script that would run under MSSQL. I could make it either create a database or populate a database. I can't seem to do both. Has anyone been able to create and populate a MSSQL database via php in one shot?? Thanks -- PHP Database Mailing List (http://www.php.net/)

[PHP-DB] MSSQL Optimize?

2003-06-04 Thread Gerard Samuel
Please forgive me for being somewhat off topic. This information is going towards a db class written in php. Does MSSQL have an SQL command counterpart to mysql's Optimize or postgresql's Vacuum?? Thanks for any insight you may provide... -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Serialize...Unserialize

2003-03-04 Thread Gerard Samuel
characters, then a varchar column can be used. But serialized data can get pretty big, so anticipate for it, by using text columns. -- Gerard Samuel http://www.trini0.org:81/ http://test1.trini0.org:81/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP-DB] Unlimited Categories

2003-01-13 Thread Gerard Samuel
would be greatly appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Users on line

2003-01-03 Thread Gerard Samuel
] http://www.purplecow.com/ --- -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Column Defualts

2002-10-29 Thread Gerard Samuel
Is defaulting a column to NULL considered as a waste of space?? I have a table that has 2 columns (so far) that defualt to NULL, and potentially, there can be good amount of rows with NULL. Just wondering... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP Database

[PHP-DB] Legal sql

2002-10-21 Thread Gerard Samuel
to do so. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Legal sql

2002-10-21 Thread Gerard Samuel
one can apply Boolean algebra and rationalise the apparent duplication: WHERE s.wid = sc.wid AND ( s.word = 'mysql' OR s.word = 'apache' ); As to which is 'right' and which 'wrong', let me ask: which one do you find most readable? Regards, =dn -- Gerard Samuel http://www.trini0.org:81/ http

[PHP-DB] MSSQL Version

2002-08-27 Thread Gerard Samuel
I just found out today that I could find out mysql or postgresql version # using an sql select statement. 'select version() as version' It doesn't work for MSSQL. Does anyone know of a way to retrieve MSSQL's version via php or sql statement. Thanks. -- Gerard Samuel http://www.trini0.org

Re: [PHP-DB] Windows XP

2002-08-20 Thread Gerard Samuel
it does the trick. -Joni- -- // Joni Järvinen // [EMAIL PROTECTED] // http://www.reactorbox.org/~wandu Gerard Samuel [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Please forgive me, but Im more versed in FreeBSD than winXP. WinXP is on my laptop

Re: [PHP-DB] Windows XP

2002-08-19 Thread Gerard Samuel
, along with checking mysql_error(). Miles At 04:18 PM 8/18/2002 -0400, Gerard Samuel wrote: Im trying to solve a problem with windows xp. I have 2 identical scripts with the same db schema. One on FreeBSD running php 4.2.2/mysql 3.23.49 the other on windows xp php 4.2.2/mysql 3.23.52

[PHP-DB] Windows XP

2002-08-18 Thread Gerard Samuel
??? Thx. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Benefits of assigning query to variable

2002-07-31 Thread Gerard Samuel
Me personally, so I can echo out the variable to see if the query is making sense. Look at it as a debugging... Brian Graham wrote: Are there any benefits to assigning a query to a variable? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP Database

[PHP-DB] sql standard

2002-06-23 Thread Gerard Samuel
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] 'htaccess method : how to modify passwords from PHP scripts ?

2001-07-26 Thread Samuel Torton
, -- Samuel Torton NCSLab.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP-DB] 'htaccess method : how to modify passwords from PHP scripts ?

2001-07-24 Thread Samuel Torton
) ? -- 2/ run a command line such as htpasswd ... (without -c argument) ? in this case, can you tell me how to run a unix command line from a PHP script ? Thanks a lot in advance. Regards, -- Samuel Torton NCSLab.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail

Re: [PHP-DB] Odd - Even Results in a Table - Newbie question

2001-05-11 Thread Samuel Torton
] ; break; } } -- redards, samuel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]