[PHP-DB] TIME FORMAT USING PHP

2003-10-10 Thread Delz
Hi All,

We have a time and attendance system that outputs the military time in and
time out of an employee on an excel file wherein the format for the time is
like this :

0900
1700

wherein 0900 is 9am and 1700 is 5pm.

Is there a way in php where i can get output like this

09:00
17:00

which is more recognizable than the latter. Any ideas would be appreciated.

Regards,

Delz

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] argh! still not able to get my variables

2003-10-10 Thread Mayo, Chuck
Shiloh,

I'm kind of a latecomer here, but on my system, this works:

COUNTY ID: $county_id\n";
} else {
}   print "No County ID\n";

?>


17089
9

Can't think why you wouldn't be able to access that value unless you're
accidently clearing it before checking it. If you're trying to access
$county_id from inside a function, though, you'll need to declare it as a
global so the function won't think you're referencing a local variable by
the same name, i.e.

function process_submit() {

global $county_id;

print "ID: $county_id\n";

}

> -Original Message-
> From: Shiloh Madsen [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 5:58 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] argh! still not able to get my variables
> 
> 
> First off, thank you to all the people who have helped me so 
> far with passing variables in a URL. I THINK it worked, but 
> it would appear not to have. 
> 
> this is the line in the page with the link:
> 
> $name
> 
> So what this should do is make the line item be a hyperlink 
> to a detail page for the county. When i click the link, the 
> address shows up as: 
> 
> http://cis1.elgin.edu/cis21020/detail.php?county_id=17089
> 
> so it appears to be passing the information. 
> 
> The thing is, i cant refrence that variable...maybe in doing 
> it wrong, but i dont know. 
> 
> Ive tried echoing $county_id and nothing shows up. Someone 
> else suggested that i put var_dump($_GET);
> into the page to see if it shows up in the variable list. 
> When i insert this line, the page only says NULL. What in the 
> world am I doing wrong?
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] argh! still not able to get my variables

2003-10-10 Thread Shiloh Madsen
First off, thank you to all the people who have helped me so far with passing 
variables in a URL. I THINK it worked, but it would appear not to have. 

this is the line in the page with the link:

$name

So what this should do is make the line item be a hyperlink to a detail page for the 
county. When i click the link, the address shows up as: 

http://cis1.elgin.edu/cis21020/detail.php?county_id=17089

so it appears to be passing the information. 

The thing is, i cant refrence that variable...maybe in doing it wrong, but i dont 
know. 

Ive tried echoing $county_id and nothing shows up. Someone else suggested that i put 
var_dump($_GET);
into the page to see if it shows up in the variable list. When i insert this line, the 
page only says NULL. What in the world am I doing wrong?



RE: [PHP-DB] mysql_error() (was Re: Getting last insert id?)

2003-10-10 Thread Jeremy Shovan
Use echo(mysql_error());

-Original Message-
From: Ben Edwards [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 5:43 AM
To: pete M
Cc: PHP DB List
Subject: Re: [PHP-DB] mysql_error() (was Re: Getting last insert id?)

On Thu, 2003-10-09 at 17:35, pete M wrote:
> http://www.php.net/manual/en/function.mysql-error.php
> 
> Ben Edwards wrote:
> 
> > On Thu, 2003-10-09 at 16:33, pete M wrote:
> > 
> >>$new_id = mysql_query('select last_insert_id()');
> >>
> >>your can also user it within a query - eg
> >>
> >>$sql = ' insert into related table parent_id, data , data2) values 
> >>(last_insert_id(), 23, 45);
> >>
> > 
> > 
> > Is there also a similar way of getting the last error message, i.e.
> > 
> > $new_id = mysql_query('select error()');
> > 
> > I currently am trying to solve the problem or mysql_error()
returning
> > nothing after an error.  It may be something to do with globals and
> > something like the above may help.
> > 
> > Ben

This I know, its just that the function always returns nothing so I was
looking for an alternative way of getting the error.
-- 

* Ben Edwards   Tel +44 (0)1179 553 551  ICQ 42000477  *
* Homepage - nothing of interest here   http://gurtlush.org.uk *
* Webhosting for the masses http://www.serverone.co.uk *
* Critical Site Builderhttp://www.criticaldistribution.com *
* online collaborative web authoring content management system *
* Get alt news/views films online   http://www.cultureshop.org *
* i-Contact Progressive Video  http://www.videonetwork.org *
* Fun corporate graphics http://www.subvertise.org *
* Bristol Indymedia   http://bristol.indymedia.org *
* Bristol's radical news http://www.bristle.org.uk *


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] RE: Need help Get/send Variabel to another window

2003-10-10 Thread Jeremy Shovan
Looks like java script to me! Can't help you there. Sorry

-Original Message-
From: Michael Scappa [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 10:02 AM
To: [EMAIL PROTECTED]; 'agus supriatna'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] RE: Need help Get/send Variabel to another window

I'm guessing this is html?

Parent.opener.formname.formfield.value = this.value;

Michael Scappa


-Original Message-
From: Jeremy Shovan [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 12:24 PM
To: 'agus supriatna'; [EMAIL PROTECTED]
Subject: [PHP-DB] RE: Need help Get/send Variabel to another window

Is it a frame page?

-Original Message-
From: agus supriatna [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 1:25 AM
To: [EMAIL PROTECTED]
Subject: Need help Get/send Variabel to another window

Dear all

I have two page one as main and secon as child, now I have problem how
to
send variable/data to main page from child

thanks in advance
asupna

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Table locking to prevent duplicate inserts?

2003-10-10 Thread Mayo, Chuck
Hi all, 

I'm working through an issue that I'm sure everyone else has already figured
out, how to lock a table during a series of INSERTS to prevent duplicate
entries: 

The scenario is this: 

OS Solaris 8 
PHP 4.2.3 
MySQL 3.23.53 
Table type: MyISAM 

1) A user submits a form containing about a hundred form fields which PHP
needs to insert into a MySQL table.

2) MySQL is busy doing a lengthy SELECT for someone else, so the user's
browser hangs until the SELECT is done. 

3) The user gets tired of waiting and hits submit again while his browser is
still hung. 

4) When the long SELECT finishes, two PHP threads kick off (I'm assuming),
the user's original submit and his second, resulting in duplicate INSERT's 

The first thing I tried was locking the tables at the top of the insert loop
then unlocking at the bottom, i.e. 

 

What I thought would happen is that one PHP thread would have to wait for
the other resulting in: 

INSERTED DATA, THREAD1  
INSERTED DATA, THREAD1  
INSERTED DATA, THREAD1
   
INSERTED DATA, THREAD2  
INSERTED DATA, THREAD2  
INSERTED DATA, THREAD2 

That wouldn't have solved my dupe issue but would have at least shown me
that locking the tables was the way to go. Instead, the inserts from the two
threads were still interleaved: 

INSERTED DATA, THREAD1  
INSERTED DATA, THREAD2
   
INSERTED DATA, THREAD1  
INSERTED DATA, THREAD2
   
INSERTED DATA, THREAD1  
INSERTED DATA, THREAD2 

Seemed like locking the tables for the duration of the insert loops would do
it but it didn't seem to. 

My next avenue of attack was a modification where the script would first
check for an existing record and update it if one was found, inserting a new
record only if there wasn't an existing record, but got exactly the same
results. Anyone have a clue what's going on here, or better still... how the
heck to make these threads play nice?

Thanks

Chuck Mayo

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] RE: Need help Get/send Variabel to another window

2003-10-10 Thread Michael Scappa
I'm guessing this is html?

Parent.opener.formname.formfield.value = this.value;

Michael Scappa


-Original Message-
From: Jeremy Shovan [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 12:24 PM
To: 'agus supriatna'; [EMAIL PROTECTED]
Subject: [PHP-DB] RE: Need help Get/send Variabel to another window

Is it a frame page?

-Original Message-
From: agus supriatna [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 1:25 AM
To: [EMAIL PROTECTED]
Subject: Need help Get/send Variabel to another window

Dear all

I have two page one as main and secon as child, now I have problem how
to
send variable/data to main page from child

thanks in advance
asupna

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] RE: Need help Get/send Variabel to another window

2003-10-10 Thread Jeremy Shovan
Is it a frame page?

-Original Message-
From: agus supriatna [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 1:25 AM
To: [EMAIL PROTECTED]
Subject: Need help Get/send Variabel to another window

Dear all

I have two page one as main and secon as child, now I have problem how
to
send variable/data to main page from child

thanks in advance
asupna

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] CONGRATULATIONS You Win

2003-10-10 Thread Matthew Moldvan
So does this mean we all won? lol

On Thu, 2003-10-09 at 18:37, Francis Weeny wrote:
> SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. 
> ALFONSTRAAT B56, 
> 1002 BS AMSTERDAM, THE NETHERLANDS. 
> TO THE MANAGER 
> FROM: THE DESK OF THE PROMOTIONS MANAGER, 
> INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT, 
> REF: OYL /26510460037/02 
> BATCH: 24/00319/IPD 
> ATTENTION: 
> RE/ AWARD NOTIFICATION; FINAL NOTICE 
> We are pleased to inform you of the announcement 
> today,  9th October 2003 of winners of the SUNSWEETWIN PROMO
> LOTTERY,THE 
> NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003
> 
> Your company,is attached to ticket number 
> 023-0148-790-459, with serial number 5073-11 drew 
> the lucky numbers 43-11-44-37-10-43, and consequently 
> won the lottery in the 3rd category. 
> You have therefore been approved for a lump sum pay 
> out of US$5,500.000.00 in cash credited to file REF 
> NO. OYL/25041238013/02. This is from total prize money
> of 
> US$80,400,000.00 shared among the seventeen
> international winners in
> this category. All participants were selected through
> a computer 
> ballot
> system drawn form 25,000 names from Australia, New 
> Zealand, America, Europe, North America and Asia as
> part of 
> International Promotions Program, which is conducted 
> annually. 
> CONGRATULATIONS! 
> Your fund is now deposited with a Security company 
> insured in your name. Due to the mix up of 
> some numbers and names, we ask that you keep this
> award strictly 
> from 
> public notice until your claim has 
> been processed and your money remitted to your
> account. 
> This is part of our security protocol to avoid 
> double claiming or unscrupulous acts by participants
> of 
> this program.  
> We hope with a part of you prize, you will 
> participate in our end of year high stakes US$1.3
> billion 
> International Lottery. 
> To begin your claim, please contact your claim 
> agent; Mr Francis weeny at this email address below.
> [EMAIL PROTECTED]
> For due processing and remittance of your prize 
> money to a designated account of your choice. 
> Remember, all prize money must be claimed not later 
> than19th October 2003. After this date, all funds will 
> be returned as unclaimed. 
> NOTE: In order to avoid unnecessary delays and 
> complications, please remember to quote your 
> reference and batch numbers in every one of your 
> orrespondences with your agent. 
> Furthermore, should there be any 
> change of your address, do inform your claims agent 
> as soon as possible. 
> Congratulations again from all our staff and thank 
> you for being part of our promotions program. 
> 
> Sincerely, 
> Clark Wood
> THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE
> NETHERLANDS.
> NB. Any breach of confidentiality on the part of 
> the winners will result to disqualification. 
> SORRY FOR THE LATE INFORMATION THANKS 
> CLARK  WOOD
> 
> 
>  
-- 
Matthew Moldvan <[EMAIL PROTECTED]>
Trilogy International, Inc.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: textarea with multiple rows and mysql insert

2003-10-10 Thread Dan Brunner
What is your field length???

Varchar(10)??

You should set the column type to text.

Dan



On Oct 10, 2003, at 10:27 AM, [EMAIL PROTECTED] wrote:


I have a form that includes two text areas that span
multiple rows. The first textarea (rows=2, cols=50) is
used to insert a pretty long url, while the second
(rows=5, cols=50) is used for inserting free text
(comments).
When I process the form to create the mysql insert
statement, the values inserted for both those text
areas get cut off after the end of each row.
How can I get the script to process the full contents?
thanks

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: textarea with multiple rows and mysql insert

2003-10-10 Thread João Cândido de Souza Neto
Hi.

I every save in text type field.

Are you doing this ?

"Jason End" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> I have a form that includes two text areas that span
> multiple rows. The first textarea (rows=2, cols=50) is
> used to insert a pretty long url, while the second
> (rows=5, cols=50) is used for inserting free text
> (comments).
> When I process the form to create the mysql insert
> statement, the values inserted for both those text
> areas get cut off after the end of each row.
> How can I get the script to process the full contents?
>
> thanks
>
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] maildir archiving to mysql

2003-10-10 Thread Geoffrey Makstutis
Hi,

I'm looking for a script or some advice that will allow me to archive a 
large number of maildir based email messages into a mysql database.

Anyone know of such an animal?

thanks

--
Geoffrey Makstutis
<[EMAIL PROTECTED]>
---
Makstutis Architecture and Design Ltd
London
---
Don't get even,
Get MAAD
---
---
This transmission and the information it
contains, including any attachment, is intended
solely for the named addressee(s). It is confidential
and may contain legally privileged information.
The unauthorised use, disclosure or copying of
this transmission or such information is strictly
prohibited.  If you are not the/an addressee,
and are in possession of this transmission
(or any copy) without the consent of any named
addressee, please notify the sender immediately
by e-mail reply.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Interbase and PHP- SHOW TABLE sql command

2003-10-10 Thread George Georgeus
Thank very much for your help. :o) That's what I need.

Ge0rge



 --- Alexey Trunyov <[EMAIL PROTECTED]> wrote: >
George Georgeus wrote:
> > Hello, 
> > I do not know how to get the list of tables in an
> > Interbase databse. When I tried to use the sql
> command
> > "SHOW TABLE;" in the php function "ibase_query();"
> I
> > got "Dynamic SQL Error SQL error code = -104 Token
> > unknown - line 1,...". Select commands work well
> but
> > this not.  "SHOW TABLE" is a regular Interbase SQL
> > command. I've tried this command with the command
> line
> > Interbase client and it works well.  
> > Does anybody know where is the problem? 
> > Thanks Ge0rge
> 
> SHOW TABLE and other SHOW* are not DSQL statements,
> they
> are just isql commands.
> You may simulate this behaviour making the following
> request:
> select RDB$RELATION_NAME
>   from RDB$RELATIONS
>   where RDB$FLAGS = 1
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Interbase and PHP- SHOW TABLE sql command

2003-10-10 Thread Alexey Trunyov
George Georgeus wrote:
Hello, 
I do not know how to get the list of tables in an
Interbase databse. When I tried to use the sql command
"SHOW TABLE;" in the php function "ibase_query();" I
got "Dynamic SQL Error SQL error code = -104 Token
unknown - line 1,...". Select commands work well but
this not.  "SHOW TABLE" is a regular Interbase SQL
command. I've tried this command with the command line
Interbase client and it works well.  
Does anybody know where is the problem? 
Thanks Ge0rge
SHOW TABLE and other SHOW* are not DSQL statements, they
are just isql commands.
You may simulate this behaviour making the following request:
select RDB$RELATION_NAME
 from RDB$RELATIONS
 where RDB$FLAGS = 1
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] mysql_error() (was Re: Getting last insert id?)

2003-10-10 Thread Ben Edwards
On Thu, 2003-10-09 at 17:35, pete M wrote:
> http://www.php.net/manual/en/function.mysql-error.php
> 
> Ben Edwards wrote:
> 
> > On Thu, 2003-10-09 at 16:33, pete M wrote:
> > 
> >>$new_id = mysql_query('select last_insert_id()');
> >>
> >>your can also user it within a query - eg
> >>
> >>$sql = ' insert into related table parent_id, data , data2) values 
> >>(last_insert_id(), 23, 45);
> >>
> > 
> > 
> > Is there also a similar way of getting the last error message, i.e.
> > 
> > $new_id = mysql_query('select error()');
> > 
> > I currently am trying to solve the problem or mysql_error() returning
> > nothing after an error.  It may be something to do with globals and
> > something like the above may help.
> > 
> > Ben

This I know, its just that the function always returns nothing so I was
looking for an alternative way of getting the error.
-- 

* Ben Edwards   Tel +44 (0)1179 553 551  ICQ 42000477  *
* Homepage - nothing of interest here   http://gurtlush.org.uk *
* Webhosting for the masses http://www.serverone.co.uk *
* Critical Site Builderhttp://www.criticaldistribution.com *
* online collaborative web authoring content management system *
* Get alt news/views films online   http://www.cultureshop.org *
* i-Contact Progressive Video  http://www.videonetwork.org *
* Fun corporate graphics http://www.subvertise.org *
* Bristol Indymedia   http://bristol.indymedia.org *
* Bristol's radical news http://www.bristle.org.uk *


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: [PEAR Newbie] PEAR problems

2003-10-10 Thread pete M
Not user but I think the DB oject is not referenced because of function 
try the following to see if it works (not tested just a hunch)

> require_once("DB.php");

> $dbname="c:\www\support\database\support.gdb";
> $dbuser="SYSDBA";
> $dbpass="masterkey";
> $dbhost="localhost";
> $db=DB::connect( "ibase://$dbuser:[EMAIL PROTECTED]/$dbname" );
>   $sql = 'SELECT NAME, DESCRIPTION FROM MENUITEM';
>   $demoResult = $db->query($sql);
>   if (DB::isError($demoResult)) {
> die ($demoResult->getMessage());
>   }
>   $count = 0;
>   $demoResult->fetchInto($row);
>   if ($row = $demoResult->fetchRow()) {
> $count ++;
> echo "Line $count";
> echo $row[0] . $row[1]. "\n";
>   }
> $db->disconnect();
pete

David Russell wrote:
Hi all,

I have been developing in PHP/Interbase for about 2 years, and have just
started a new PHP aplication.
I wanted to use PEAR's DB abstraction, but am running into (big) problems. I
am sure I am doing something really stupid, but let's try anyway
External .inc.php file containing the following:

require_once("DB.php");
  Function Connect_DB() {
$dbname="c:\www\support\database\support.gdb";
$dbuser="SYSDBA";
$dbpass="masterkey";
$dbhost="localhost";
$db=DB::connect( "ibase://$dbuser:[EMAIL PROTECTED]/$dbname" );
return $db;
  }
  Function Disconnect_DB($db) {
$db->disconnect();
  }
I include this file, and then have the following code:

 $db=Connect_DB();
  $sql = 'SELECT NAME, DESCRIPTION FROM MENUITEM';
  $demoResult = $db->query($sql);
  if (DB::isError($demoResult)) {
die ($demoResult->getMessage());
  }
  $count = 0;
  $demoResult->fetchInto($row);
  if ($row = $demoResult->fetchRow()) {
$count ++;
echo "Line $count";
echo $row[0] . $row[1]. "\n";
  }
  Disconnect_DB($db);
The database Seelct statement should return 2 populated rows (and does in
other app)
The problem is that this section is either totally ignored, or it returns
millions of lines with blank $row resurls (ie lines of "Line1\nLine2\n, etc)
Where am I going wrong?

Thanks in advance...

David R
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Interbase and PHP- SHOW TABLE sql command

2003-10-10 Thread David Russell
Hi George,

Send me more information about the Select statement you are using, and I can
look at it.

Also, more info about version (interbase/firebird, PHP, server) could help.

Cheers

David R

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] [PEAR Newbie] PEAR problems

2003-10-10 Thread David Russell
Hi all,

I have been developing in PHP/Interbase for about 2 years, and have just
started a new PHP aplication.

I wanted to use PEAR's DB abstraction, but am running into (big) problems. I
am sure I am doing something really stupid, but let's try anyway

External .inc.php file containing the following:

require_once("DB.php");
  Function Connect_DB() {
$dbname="c:\www\support\database\support.gdb";
$dbuser="SYSDBA";
$dbpass="masterkey";
$dbhost="localhost";
$db=DB::connect( "ibase://$dbuser:[EMAIL PROTECTED]/$dbname" );
return $db;
  }
  Function Disconnect_DB($db) {
$db->disconnect();
  }

I include this file, and then have the following code:


 $db=Connect_DB();
  $sql = 'SELECT NAME, DESCRIPTION FROM MENUITEM';
  $demoResult = $db->query($sql);
  if (DB::isError($demoResult)) {
die ($demoResult->getMessage());
  }
  $count = 0;
  $demoResult->fetchInto($row);
  if ($row = $demoResult->fetchRow()) {
$count ++;
echo "Line $count";
echo $row[0] . $row[1]. "\n";
  }
  Disconnect_DB($db);

The database Seelct statement should return 2 populated rows (and does in
other app)
The problem is that this section is either totally ignored, or it returns
millions of lines with blank $row resurls (ie lines of "Line1\nLine2\n, etc)

Where am I going wrong?

Thanks in advance...

David R

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: FRe[2]: [PHP-DB] MySQL Regular expression

2003-10-10 Thread O Franssen
Thanks very much for your help Rory. :)

-- 
Regards,
Owen Franssen
Twisted Designmailto:[EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Informix 9.20 ifx_query SQLCODE=-410

2003-10-10 Thread Tomá¹ Tominec
Hi,
I have Informix 9.2 on Solaris and IIS on XP professional.
when I run SQL statement,

$conn_id = ifx_connect ("[EMAIL PROTECTED]", "name", "pwd");

$qry = " SELECT a,b  FROM c ";

if (! $conn_id) {
printf("Cannot connect to the DB SERVER.");
}
$res = ifx_query($qry,$conn_id);

 I will get error:
  Warning: ifx_query(): Describe fails (E [SQLSTATE=37 000 SQLCODE=-410])


The same SQL statement run corectly with ODBC.

$conn_id = odbc_connect ("odbc_alias", "name", "pwd");

$qry = " SELECT a,b  FROM c ";

if (! $conn_id) {
printf("Cannot connect to the DB SERVER.");
}
$res = odbc_exec($conn_id,$qry);


Thank's for help.

Tomas

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] textarea with multiple rows and mysql insert

2003-10-10 Thread Jason End
I have a form that includes two text areas that span
multiple rows. The first textarea (rows=2, cols=50) is
used to insert a pretty long url, while the second
(rows=5, cols=50) is used for inserting free text
(comments).
When I process the form to create the mysql insert
statement, the values inserted for both those text
areas get cut off after the end of each row.
How can I get the script to process the full contents?

thanks

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Interbase and PHP- SHOW TABLE sql command

2003-10-10 Thread George Patterson
I haven't used Interbase but could it be "show tables;".

Just a thought...

On Fri, 10 Oct 2003 09:34:49 +0100 (BST)
George Georgeus <[EMAIL PROTECTED]> wrote:

> Hello, 
> I do not know how to get the list of tables in an
> Interbase databse. When I tried to use the sql command
> "SHOW TABLE;" in the php function "ibase_query();" I
> got "Dynamic SQL Error SQL error code = -104 Token
> unknown - line 1,...". Select commands work well but
> this not.  "SHOW TABLE" is a regular Interbase SQL
> command. I've tried this command with the command line
> Interbase client and it works well.  
> Does anybody know where is the problem? 
> Thanks Ge0rge
> 
> _
> ___ Want to chat instantly with your online friends?  Get the FREE
> Yahoo! Messenger http://mail.messenger.yahoo.co.uk
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Interbase and PHP- SHOW TABLE sql command

2003-10-10 Thread George Georgeus
Hello, 
I do not know how to get the list of tables in an
Interbase databse. When I tried to use the sql command
"SHOW TABLE;" in the php function "ibase_query();" I
got "Dynamic SQL Error SQL error code = -104 Token
unknown - line 1,...". Select commands work well but
this not.  "SHOW TABLE" is a regular Interbase SQL
command. I've tried this command with the command line
Interbase client and it works well.  
Does anybody know where is the problem? 
Thanks Ge0rge


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Need help Get/send Variabel to another window

2003-10-10 Thread agus supriatna
Dear all

I have two page one as main and secon as child, now I have problem how to
send variable/data to main page from child

thanks in advance
asupna

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



FRe[2]: [PHP-DB] MySQL Regular expression

2003-10-10 Thread Rory McKinley
> HI Owen
>
> I am not sure about strcmp - I have never used it on numbers before..MySQL
> 2nd Ed by DuBois  Which is well worth the money - makes me look
> intelligent  says that strcmp sorts lexically...and to be quite
> honest, I need to go look that up.. but I think it will work...
>
> However, using the code from your previous comment, you can try casting
your
> result as an unsigned integer like so (if yourMySQL is ver 4.0.2 or up)...
>
> select * from ihrproperties where region = 'Kerry' and 0 <
> CAST(substring_index(substring_index(rates, ',', 41), ',', -1) AS UNSIGNED
> INTEGER) < 1568
>
> If you don't have 4.0.2 - I would suggest you try strcmp and see ...
>
> Rory McKinley
> Nebula Solutions
> +27 82 857 2391
> [EMAIL PROTECTED]
> "There are 10 kinds of people in this world,
> those who understand binary and those who don't" (Unknown)
> - Original Message - 
> From: "O Franssen" <[EMAIL PROTECTED]>
> To: "Rory McKinley" <[EMAIL PROTECTED]>
> Sent: Thursday, October 09, 2003 6:22 PM
> Subject: Re[2]: [PHP-DB] MySQL Regular expression
>
>
> > Actually in response to my previous comment, would the following
> > achieve wwhat I want?
> >
> > ... and strcmp('$foot_budget', substring_index(substring_index(rates,
',',
> $selecteddate), ',', -1)) = -1 and strcmp('$head_budget',
> substring_index(substring_index(rates, ',', $selecteddate), ',', -1)) = 1
> >
> > -- 
> > Regards,
> > Owen Franssen
> > Twisted Design
mailto:[EMAIL PROTECTED]
> >
> >
> >
> >
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php