[PHP-DB] Auto_Increment

2001-03-29 Thread Ben Cairns
What is the best field type to use for an Auto_Increment field? i am using int at the moment, is there a better one? -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com "MAKING sense of the

RE: [PHP-DB] Auto_Increment

2001-03-29 Thread Boaz Yahav
The correct question is if it's even possible to use a non integer field with auto_increment with MySQL (assuming it's MySQL) and the answer is : No. you must use an int type. From the MySQL manual : "An integer column may have the additional attribute AUTO_INCREMENT. ". Sincerely berber

[PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
I have been trying to get a new column added to a table (vips) via a PHP script, but having exhausted all the things I can find, I'm still struggling. I've referred t TFM for all those who just can't wait to tell me to do so, and believe my SQL statement is correct: $NewCol = $Prod_Code;

Re: Odp: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Hans-Werner Guth
We do it this way (code snippet) ... $dbqueryline = mysql_db_query ($mredatabase, "select vorgang, bezeichnung from mrebewkennz order by vorgang", $dbhandle); if (mysql_errno() != 0) { echo mysql_error(); echo "\n"; } else { $bewkenznzahl = mysql_num_rows($dbqueryline); print

Re: [PHP-DB] managing large result sets

2001-03-29 Thread Manuel Lemos
Hello, houston wrote: I have to deal with displaying result sets that could potentially be quite large. It would be bad form to drop 10,000 rows into a browser table so I need a strategy for dealing with this possibility. It's obviously not a big deal to limit the output but what is the

Re: [PHP-DB] Auto_Increment

2001-03-29 Thread Sean Weissensee
You can use the Serial Datatype if using Postgres. -- 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]

Re: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Manuel Lemos
Hello, "Martin E. Koss" wrote: I have been trying to get a new column added to a table (vips) via a PHP script, but having exhausted all the things I can find, I'm still struggling. I've referred t TFM for all those who just can't wait to tell me to do so, and believe my SQL statement is

[PHP-DB] Problems with Oracle connections

2001-03-29 Thread bgadelha
Hi, I'm having troubles using PHP+Oracle. I´m under Win98, with Apache WebServer, PHP4 and Oracle. When I try to connect, the following error message is displayed: Warning: Unable to connect to ORACLE (ORA-12154: TNS:could not resolve service name) in c:\apache\htdocs\testeoracle.php on line 24

RE: [PHP-DB] Problems with Oracle connections

2001-03-29 Thread Brian Hardwick
I belive you have to set your sid and oracle_home before attempting to ora_logon? putenv("ORACLE_SID=your sid); putenv("ORACLE_HOME=your oracle home); if(ora_plogon("rascunho@dvfpmm","java")) { echo "conectou"; } else { echo "falhou outra vez:".ora_error(); }") -Original Message- From:

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
While I appreciate your comments about metabase I simply don't have time to start the project again, it has taken a long time to get this far. Perhaps I'll look at metabase for future developments. In the meantime, anyone seeing this message for the first time, I'm still struggling with my code

Re: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Jason Stechschulte
On Thu, Mar 29, 2001 at 12:20:41PM +0100, Martin E. Koss wrote: I have been trying to get a new column added to a table (vips) via a PHP script, but having exhausted all the things I can find, I'm still struggling. I've referred t TFM for all those who just can't wait to tell me to do so, and

Re: [PHP-DB] Problems with Oracle connections

2001-03-29 Thread houston
Have you tried supplying the optional third parameter to ociplogon() to specify the connection? ociplogon( "username","password","tns_alias"); --Houston ""bgadelha"" [EMAIL PROTECTED] wrote in message Hi, I'm having troubles using PHP+Oracle. I´m under Win98, with Apache WebServer, PHP4

[PHP-DB] HERE doc

2001-03-29 Thread houston
In his excellent book "Core PHP Programming", Leon Atkinson says that PHP supports Perl-style "HERE docs". I have tried to make this work with PHP4.04 with no success. I also haven't found any reference to HERE docs in the PHP documentation. Is this really supported in PHP? -- PHP Database

[PHP-DB] PEAR DB documentation?

2001-03-29 Thread David Osborne
Where can I find user-level documentation for the DB database abstraction layer in PEAR? The stuff on www.php.net pointed to from http://pear.php.net/ seems to be aimed at developers and I'm not ready for that yet (unless someone has saved me some work and has a working DB component for

RE: [PHP-DB] HERE doc

2001-03-29 Thread Mark Roedel
-Original Message- From: houston [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 8:40 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] HERE doc In his excellent book "Core PHP Programming", Leon Atkinson says that PHP supports Perl-style "HERE docs". I have tried to make

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Martin E. Koss
I did what you suggested and (exactly as it appears in the browser window) here is what is sent to the screen: ALTER TABLE vips ADD NewAD FLOAT (11,2) DEFAULT '0.00' The new item (sent from the previous form) is added to the database but the new column is NOT added to the other table, but no

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Walter Franssen
Is the SQL statment correct. Don't is must be ALTER TABLE vips ADD COLUMN $NewCol VARCHAR(50) NULL"; -Original Message- From: Jason Stechschulte [mailto:[EMAIL PROTECTED]] Sent: donderdag 29 maart 2001 16:29 To: Martin E. Koss Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] ALTER TABLE -

[PHP-DB] putenv() doesn't seem to work!! Groan!

2001-03-29 Thread Scott Fletcher
Hi! I'm using PHP4, iODBC OpenLink for the database connection and communication. After installing the iODBC (driver manager) OpenLink (driver), fix up the odbc.ini (part of iODBC or OpenLink) and did the odbctest. The test passed and it connect the linux to the MS-SQL Server and I was

Re: [PHP-DB] putenv() doesn't seem to work!! Groan!

2001-03-29 Thread Scott Fletcher
One more thing, could it be that it doesn't work with Caldera Linux?? Scott ""Scott Fletcher"" [EMAIL PROTECTED] wrote in message 99vijo$5uj$[EMAIL PROTECTED]">news:99vijo$5uj$[EMAIL PROTECTED]... Hi! I'm using PHP4, iODBC OpenLink for the database connection and communication. After

RE: [PHP-DB] Select Database number show it

2001-03-29 Thread Mirko Cegledi
-Original Message- From: David Balatero [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 4:33 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Select Database number show it I believe this is what you want: SELECT * FROM mydatabase LIMIT 0,5 Hi!

Re: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Doug Semig
I see you there's been lots of responses already, but there's an important related bit of news folks might want to know. Everyone who uses the mysql_affected_rows() should know that a bug was fixed in 3.23.36 that evidentally reports affected rows incorrectly if MySQL was compiled without

Re: [PHP-DB] Auto_Increment

2001-03-29 Thread Johannes Janson
Hi, well usually yuto_increment is used on ID fields. then depending on how many rows your table has tinyint (up to 255; 1k), smallint (up to 65535; 2k) mediumint (up to 16777215; 3k) int (up to 4294967295, 4k). Johannes "Ben Cairns" [EMAIL PROTECTED] schrieb im Newsbeitrag

[PHP-DB] Problem with single qoutes

2001-03-29 Thread Matt Braynard
I have created a news script and to my dismay, the script is breaking when there is a single quote - ' - in a form that goes to the database. Any solutions? The text of the script is below. --- titleE3 Confirm News/title html font size=+2E3 Confirm News Page/fontp Make the necessary edits and

[PHP-DB] news manager

2001-03-29 Thread Mike Baerwolf
Hello, I'm working on a news manager and would like to display records for today,yesterday,last week, last month and so on. This is what I have so far, $result = mysql_query("SELECT * FROM news WHERE timestamp=010325",$db); if ($myrow = mysql_fetch_array($result)) { Is there a way to do

Re: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Jason Stechschulte
On Thu, Mar 29, 2001 at 05:31:39PM +0100, Martin E. Koss wrote: I just pasted: ALTER TABLE vips ADD NewAD FLOAT (11,2) DEFAULT '0.00' NULL into the 'Run SQL' box on phpMyAdmin and it did exactly what it should do. I did it both online (hosting servers) and offline on my Win/Apache and both

[PHP-DB] PHP on WIN32 with DB2 CLI

2001-03-29 Thread Chris Book
Hi, I've compiled php before with --with-ibm-db2 to use DB2's CLI driver. Now I'm working on NT with the php binary, and I can't figure out how to connect to DB2 except with ODBC. I would prefer to use the CLI interface than an ODBC interface. Is this possible or am I stuck with ODBC on NT?

RE: [PHP-DB] how do I connect to MSSQL2000 and mySQL with PHP4 and Linux?

2001-03-29 Thread Daevid Vincent
By the way, I understand there are major issues with SQL2000 server. In that case, ODBC might be a better choice. Figures, that's the version we're using... So what all is involved with getting ODBC to work. Also, in case this wasn't obvious, I'm trying to connect from the PHP/Apache/Linux

RE: [PHP-DB] how do I connect to MSSQL2000 and mySQL with PHP4 and Linux?

2001-03-29 Thread Andrew Hill
Hi Daevid, ODBC isn't that scary :) You bascially need to link a Driver Manager into PHP so it can knows how to bind to the ODBC layer. The Quick and Dirty instructions are 1. download the iODBC sdk from www.iodbc.org, 2. add --with-iodbc=/path/to/iodbc in to your configure 3. proceed as

Re: [PHP-DB] variables

2001-03-29 Thread Terry Romine
On Thursday, March 29, 2001, at 04:58 PM, Scott Kalbach wrote: I have the individual queries in include files. It does the first 2 queries fine,but when it gets to the third, the value of $customer seems to be gone, so I get no result for the rest of the query's. I looked in my scripts

[PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Jordan Elver
Hi, i was just wondering what you guys do to check if a wquery suceeded or not? I know about mysql_num_rows() and mysql_affected_rows(), just wondered what you guys do? I normally do something like: $sql = "SELECT something FROM table"; $result = mysql_query($sql); if(@mysql_num_rows($result)

[PHP-DB] RE: [PHP] Best way to check if a query succeeded

2001-03-29 Thread Jon Haworth
What about: $sql = "SELECT something FROM table"; $result = mysql_query($sql) or die ("Query failed!"); do_something(); //the query has succeeded if we get to this line HTH Jon -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 12:00 To: PHP Database

RE: [PHP-DB] how do I connect to MSSQL2000 and mySQL with PHP4 and Linux?

2001-03-29 Thread Daevid Vincent
The Quick and Dirty instructions are 1. download the iODBC sdk from www.iodbc.org, can you give me the EXACT URL's for EVERYTHING I need to download and install re: ODBC I have RedHat 6.2, (so glibc2) 2. add --with-iodbc=/path/to/iodbc in to your configure I'm having difficulties with that

[PHP-DB] MySql Connect question

2001-03-29 Thread Phil Jackson
Hi, If I were to try to connect to a MySQL DB from some scripting language, in the connection string what do I put in the "provider=" string for an ODBC connection? I'd like to try this from an ASP application using ADO, but need to know this. Before you boo and hiss - I've duplicated the

Re: [PHP-DB] variables

2001-03-29 Thread Phil Jackson
Dunno without looking at code, but try storing the value of $customer into a local variable when the script is invoked - something is wiping it clean. my thunks, Phil J. Scott Kalbach wrote: I am having a problem with losing a variables value. What I am doing is taking the value from a

Re: [PHP-DB] PHP on WIN32 with DB2 CLI

2001-03-29 Thread Phil Jackson
Chris - I think to use DB2's CLI interface, you need a compiled langauge, like some flavor of C++ or VB. I've seen some examples using the CLI interface, so my question is why on earth would you chose that over generic ODBC? That CLI is nasty-looking, pages of code versus what you can do in a

[PHP-DB] $vars to JS in a linked js page.

2001-03-29 Thread John Starkey
I've got 2000 pages that are dependent on one include and I don't wanna alter it too much and I'd like to use some JS in a linked file. I don't wanna include it in and have it displayed. Is there a way to do: $some_number = $mysql_num_rows; link lanuguage="JavaScript" type="text/javascript"

[PHP-DB] session.save_handler

2001-03-29 Thread Rol
Hello What entry in the php.ini is required, if I would like to store and retrieve all sessions form a mysql database. Presently session are written to the /tmp folder as well. session.save_handler session.save_path thanks Roland -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] php + clibpdf tutorial

2001-03-29 Thread Osman Omar
hi, Is there any good site for learning php and clibpdf? I try using php manual and cannot get it working even I copy and paste the code thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP-DB] $vars to JS in a linked js page.

2001-03-29 Thread Phil Jackson
I think your only choices are to put this value into either a database or if you are using php4 - to use a session varible - or use a cookie if you are trying to persist this value across multiple pages for multiple users...or pass as a querystring to the next page.. or as a hidden form variable

RE: [PHP-DB] ALTER TABLE - code not working.

2001-03-29 Thread Matt Williams
-Original Message- From: Martin E. Koss [mailto:[EMAIL PROTECTED]] Sent: 29 March 2001 15:32 To: Manuel Lemos; [EMAIL PROTECTED] Subject: RE: [PHP-DB] ALTER TABLE - code not working. $AddColQuery = "ALTER TABLE vips ADD COLUMN $NewCol"; $result = mysql_query

Re: [PHP-DB] $vars to JS in a linked js page.

2001-03-29 Thread Russ Michell
Not too sure if this is what you want, if not - I'm sorry: $some_number = $mysql_num_rows() sizeof() This counts the number of elements in an array..(Just wipped that outta the open page in "PHP Fast and Easy"!) Russ #---#