[PHP-DB] Re: Quarter question..

2002-11-04 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > HI all, > > In the code below I'm trying to get the last column to show 1, 2, 3, or 4= > =20 > according to which quarter of the year it is. But all it shows in that co= > lumn=20 > is " Resource ID # X". The X starts with #3 and goes to

Re: [PHP-DB] Check If Table Exists

2002-11-04 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > >RTFM? > Read The Fine Manual -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Check If Table Exists

2002-11-04 Thread Snijders, Mark
not to make a point but the F = fucking and not fine :-) -Original Message- From: David Robley [mailto:robleyd@;paradise.net.nz] Sent: maandag 4 november 2002 9:46 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Check If Table Exists In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says.

RE: [PHP-DB] Connecting to DB on separate server?

2002-11-04 Thread Peter Lovatt
Hi You need to pinpoint where the break in communication is. Does php connect ok to a database on the local machine? no -> php or local MySql config problem? yes -> can you ping the database server from the php server? no -> network problem yes ->MySql problem ->is MySql running

RE: [PHP-DB] Connecting to DB on separate server?

2002-11-04 Thread Peter Lovatt
Also the following might give a more useful error message $link=mysql_connect($hostname, $user, $pass) echo mysql_errno() . ": " . mysql_error(). "\n"; Peter --- Excellence in internet and open source software -

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
> $sql = "select quarter($qdate)" or die("not work #3"); change to $sql = "select quarter($qdate) as my_quarter"; //Added an alias to quarter($qdate). Easier to access that way... And there's no need for an 'or die()' here. You're just assigning a variable and most likely this will allways work!

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
> > printf("Delete", > > $PHP_SELF, > > $myrow["id"]); > > printf(" > href=\"%s?id=%s&submit=yes\">Update%s > > %s %s", > > "update-inv.php", $myrow["id"], $myrow["name"], > > $myrow["details"], $yyy); My bad. Before this printf statement you need $my_var = mysql_fetch_array($yyy); and

Re: [PHP-DB] Quarter question..

2002-11-04 Thread Jason Wong
On Monday 04 November 2002 19:58, [EMAIL PROTECTED] wrote: > > $sql = "select quarter($qdate)" or die("not work #3"); > > change to > $sql = "select quarter($qdate) as my_quarter"; //Added an alias to > quarter($qdate). Easier to access that way... > And there's no need for an 'or die()' here. You'

[PHP-DB] Locking for data integrity

2002-11-04 Thread Josh Johnson
I'm making a query to one table, and inserting it into another table (INSERT.SELECT syntax). The table that's the source of the copy is updated constantly, and is has a large amount of data in it. Will locking the table for write (or read??) access keep insert queries to the source table from execu

Re: [PHP-DB] Locking for data integrity

2002-11-04 Thread Peter Beckman
They will be queued, in my experience. Peter On Mon, 4 Nov 2002, Josh Johnson wrote: > I'm making a query to one table, and inserting it into another table > (INSERT.SELECT syntax). The table that's the source of the copy is > updated constantly, and is has a large amount of data in it. Will > l

RE: [PHP-DB] Quarter question..

2002-11-04 Thread joakim . andersson
> On Monday 04 November 2002 19:58, [EMAIL PROTECTED] wrote: > > > $sql = "select quarter($qdate)" or die("not work #3"); > > > > change to > > $sql = "select quarter($qdate) as my_quarter"; //Added an alias to > > quarter($qdate). Easier to access that way... > > And there's no need for an 'or die

Re: [PHP-DB] Re: Generating readio buttons

2002-11-04 Thread Peter Beckman
On Sun, 3 Nov 2002, David Jackson wrote: > OK, this works but there has to be a pretty way? > > David Operation Sticky Bun Operation Sticky Bun '; $header = mysql_query ("SELECT * FROM chart ORDER BY acct"); if (mysql_num_rows($header)>0) { while ($row = mysql_fetch_array($header)) {

[PHP-DB] OCIBindByName with Oracle 8i17 problem ?!

2002-11-04 Thread Fabien JOSEPH
I discovered recently that it was impossible to bind an output placeholder plsql (an input work only). Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3 Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.3 Configuration 3 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.2 Wit

Re: [PHP-DB] OCIBindByName with Oracle 8i17 problem ?!

2002-11-04 Thread Thies C. Arntzen
On Mon, Nov 04, 2002 at 06:16:04PM +0100, Fabien JOSEPH wrote: > I discovered recently that it was impossible to bind an output > placeholder plsql (an input work only). > > Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3 > Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4

[PHP-DB] how to timeout a db connect

2002-11-04 Thread Alex Howansky
Is there any way to control the timeout of a pg_connect() call? I.e., if the connect doesn't succeed in N seconds, abort immediately, and fall through to the next line of code. I've got my app configured to go into "maintenance mode" when the db connect fails... only problem is, that takes too lon

[PHP-DB] Oracle via PHP on OS X

2002-11-04 Thread James Stepanek
I need to make connections of this sort but cannot find the needed extensions. Could someone point me in the right direction? I'm using 10.1.5. James -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Quarter question..

2002-11-04 Thread Jason Wong
On Monday 04 November 2002 22:56, [EMAIL PROTECTED] wrote: > I might have been unclear in my reply. Sorry, I was following this thread on and off and probably misinterpreted your post. > The original code had an 'or die()' on $sql = "select..." aswell and that > is, in my opinion, rather unnece

[PHP-DB] Date and time issues

2002-11-04 Thread Frederik Feys
Hi all, I searched for 5 hours, trying to solve my (newbie?) problem. I want to pick today's date and add XXX days to it. Its setup to validate membership period. Now my column is of date type. Aswell, I want to pick current time and add 1 hour to it. Here aswell, sessions expire after one hour. Ca

Re: [PHP-DB] Date and time issues

2002-11-04 Thread Peter Beckman
I assume you are trying to insert into a mysql table column that is a date. insert into table (datecol) values (from_unixtime($new_exp_day)); Example output of from_unixtime: +---+ | from_unixtime(10) | +---+ | 2001-09-08 21:46:40 | +

Re: [PHP-DB] Date and time issues

2002-11-04 Thread Ignatius Reilly
If you are using MySQL, you may profitably investigate the function DATE_ADD( date, INTERVAL ) Ignatius J. Reilly - Original Message - From: "Frederik Feys" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 04, 2002 10:32 PM Sub

[PHP-DB] Re: OCIBindByName with Oracle 8i17 problem ?!

2002-11-04 Thread Michael Mauch
Fabien Joseph <[EMAIL PROTECTED]> wrote: > I discovered recently that it was impossible to bind an output > placeholder plsql (an input work only). > > Configuration 1 : Suse + Oracle 8i17 + oci (oracle) + PHP4.2.3 > Configuration 2 : HPUX11 + Oracle 8i17 + oci(oracle) + PHP4.2.3 > Configuration 3

Re: [PHP-DB] error messages to variables

2002-11-04 Thread Bob Lockie
Jason Wong wrote: On Monday 04 November 2002 12:10, Bob Lockie wrote: "You can suppress the error message on failure by prepending a @ to the function name.". How can you get the error string into a local variable? Look a

[PHP-DB] persistant database connections

2002-11-04 Thread Bob Lockie
I'm using mysql_pconnect(...) at the beginning of a PHP page. Can I safely use mysql_select_db(...) later on the page? I thought I read somewhere that you can't rely on HTML to be rendered from top to bottom. Can I rely on PHP to be interpreted from top to bottom? -

[PHP-DB] Re: mysql_fetch_array() question

2002-11-04 Thread Graeme McLaren
Hi everyone, I think I've got the problem sorted, I'll soon let y'all know if it doesn't work ! Cheers, Graeme :) On Mon, 2002-11-04 at 21:47, Graeme McLaren wrote: > Hi, Anyone know how I can use two mysql_fetch_array() functions similar > to the code below? I've tried a few different ways bu

[PHP-DB] mysql_fetch_array() question

2002-11-04 Thread Graeme McLaren
Hi, Anyone know how I can use two mysql_fetch_array() functions similar to the code below? I've tried a few different ways but I keep getting Resource ID #4. I need to do this to retrieve an email address from one table and retrieve details from another. Cheers for any tips - I'm stumped with th