Re: [PHP-DB] Help please, back to an error

2004-09-15 Thread Stuart Felenstein
Micah, Your right! I regretted this post after I hit send. The code generator is actually okay. I'm learning more about PHP, and what the code actually means, in the event it needs to be modded / edited. Sorry again for the post and thanks for the reply! Stuart --- Micah Stevens [EMAIL

[PHP-DB] Using sessions to gather visitor information

2004-09-15 Thread Vincent Jordan
I am trying to track the users that visit one page on a site. I am having a couple of problems. The time seems to be 5 hours off. I do not have any tables as of yet what I would like to do is only count an ip address as one in a 24 hour period, if more than one visit then update visit count.I have

[PHP-DB] search query

2004-09-15 Thread peppe
Hi I have a option box with values select name=prijsklasse class=bodyzwart id=prijsklasse option value=1 selectedLess than 150.000 option value=2tot 175.000 option value=3tot 200.000 option value=4tot 250.000 option

RE: [PHP-DB] PHP 5 Error Handling

2004-09-15 Thread Gary Every
Good question. I've tried the __LINE__ and __FILE__ in my error-handling, but it does the same thing you're experiencing, getting the line in the function/method as opposed to the actual error line. The only way I've gone around it is whenever there may be an exception, such as a sql statement,

Re: [PHP-DB] Sybase Peristent Connections Gotchas

2004-09-15 Thread Brian Foddy
On transactions, no this is my biggest concern. Say a php script performs a begin tran then aborts early due to an error (user error for instance), but the script error handling fails to rollback the transaction before it exits. Just 1 poorly coded script. Now the begin tran is still open, the

Re: [PHP-DB] Using sessions to gather visitor information

2004-09-15 Thread John Holmes
From: Vincent Jordan [EMAIL PROTECTED] I am trying to track the users that visit one page on a site. I am having a couple of problems. The time seems to be 5 hours off. I do not have any tables as of yet what I would like to do is only count an ip address as one in a 24 hour period, if more than

Re: [PHP-DB] Using sessions to gather visitor information

2004-09-15 Thread Philip Thompson
Hi. On Sep 15, 2004, at 6:55 AM, Vincent Jordan wrote: I am trying to track the users that visit one page on a site. I am having a couple of problems. The time seems to be 5 hours off. I do not have any tables as of yet what I would like to do is only count an ip address as one in a 24 hour

[PHP-DB] Totally lost on why If statement doesn't work to call query

2004-09-15 Thread Karen Resplendo
This works: If(C==C) { //query and display here } This works: If(C==D) { //query and display here (won't happen) } In other words the query inside the If clause runs or not, depending on the logic. But, when I initialize $z=odbc_result($data5,SystemType); and $thissystem=C then this doesn't work:

[PHP-DB] Re: Using sessions to gather visitor information

2004-09-15 Thread Jasper Howard
the time difference is most likely becuase your server is in a different time zone, or is at least set to a different time zone. When you run your time calculations, you can add something like this: $now = (time() - 18000); that would give you the time on the server minus 5 hours. Now I don't

Re: [PHP-DB] Totally lost on why If statement doesn't work to call query

2004-09-15 Thread John Holmes
From: Karen Resplendo [EMAIL PROTECTED] $data5=odbc_do($connectionSDS,SELECT SystemType FROM orweb.dbo.InventoryTiny WHERE PWS='$pwsno'); $z=odbc_result($data5,SystemType); $thissystem=C; echo $z; //returns C echo br; echo $thissystem; //returns C echo br; If($z==$thissystem) Try var_dump($z)

Re: [PHP-DB] Sybase Peristent Connections Gotchas

2004-09-15 Thread Robert Twitty
Hi Brian Why don't you just avoid using sybace_pconnect() with transactions? I use ODBTP to connect to SQL Server and Sybase databases, and this is not an issue. The reason is because ODBTP involves the use of a mediating service that pools all connections, and automatically rollbacks

Re: [PHP-DB] Sybase Peristent Connections Gotchas

2004-09-15 Thread Brian Foddy
Bob, I agree there are inherit limitations and better ways to pool db connections. Any decent middleware package would probably handle these problems very easily. I just thought that some people may have found simplier ways to realize the benefits of pconnect and reduce some of the side effects.

Re: [PHP-DB] Totally lost on why If statement doesn't work to call query

2004-09-15 Thread Karen Resplendo
whoa! It looks like a space. no? results of echo var_dump($z): string(4) C I'll try a trim statement. thanks! John Holmes [EMAIL PROTECTED] wrote: From: Karen Resplendo $data5=odbc_do($connectionSDS,SELECT SystemType FROM orweb.dbo.InventoryTiny WHERE PWS='$pwsno');

Re: [PHP-DB] PHP 5 Error Handling

2004-09-15 Thread Joseph Crawford
guys thanks for the responses, i am sure i may be able to parse the results of $e-getTrace() to get the results i want ;) On Wed, 15 Sep 2004 09:25:05 -0500, Gary Every [EMAIL PROTECTED] wrote: Good question. I've tried the __LINE__ and __FILE__ in my error-handling, but it does the same thing

[PHP-DB] Limiting records per page

2004-09-15 Thread Aaron Todd
I have written a script that will display the contents of a MYSQL database that starting to fill up. I would like to be able to only show about 20 records per page and then at the bottom of the page there will be buttons to move to the nest page which gets the next 20 records. I understand

[PHP-DB] Newby variable error

2004-09-15 Thread W Roothman
Wizards, I am VERY new to PHP, paging through Meloni's 'PHP Essentials' I get the following error which I assume is very simple to solve, but for me. I have tried different approaches in identifying the 'price' variable with no luck: error: Notice: Undefined variable: price in

[PHP-DB] Re: Accessing Matisse DB

2004-09-15 Thread Petrus Ali Saputra
Petrus Ali Saputra wrote: Is there anyone here can tell me how to access Matisse DB? Thank you. Isn't there anyone can help me? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: Accessing Matisse DB

2004-09-15 Thread John Holmes
Petrus Ali Saputra wrote: Petrus Ali Saputra wrote: Is there anyone here can tell me how to access Matisse DB? Thank you. Isn't there anyone can help me? ODBC? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals

[PHP-DB] replacing dynamic variable in preg_replace

2004-09-15 Thread Steve Morgan
I am working on a script which takes a list of variables form a database. The problem i am currently having is some of the variables have other variables in the content , i.e. $temp=h1$title/h1 (made up example), is something that might come out of the mysql. $query=mysql_query(SELECT

Re: [PHP-DB] Newby variable error

2004-09-15 Thread graeme
Hi, first step in debugging...learn to love the var_dump() function :) just add the following code to the do_calculate.php function ... ?php var_dump ($_POST); echo br; // set up the pricing assignments ... This will display what is held in your $_POST variable. When you run the script at the

Re: [PHP-DB] replacing dynamic variable in preg_replace

2004-09-15 Thread John Holmes
Steve Morgan wrote: I am working on a script which takes a list of variables form a database. The problem i am currently having is some of the variables have other variables in the content , i.e. $temp=h1$title/h1 (made up example), is something that might come out of the mysql.

Re: [PHP-DB] Re: Accessing Matisse DB

2004-09-15 Thread John Holmes
Petrus Ali Saputra wrote: John Holmes wrote: Petrus Ali Saputra wrote: Petrus Ali Saputra wrote: Is there anyone here can tell me how to access Matisse DB? Thank you. Isn't there anyone can help me? ODBC? Yes, but it will lower the ability of Matisse. Sorry, you did not phrase that in the form of