Re: [PHP-DB] mysql_connect dies silently

2004-09-14 Thread Mulo Emmanuel
Did not see any attachment...?  The upgrade might have been the 
problem.  You might need to recompile or reinstall php...

Christian Schlaefcke wrote:
This looks like it is enabled. I recently upgraded mysql to version
4.1.4. Maybe this causes the problem. Do I have to reinstall PHP it is
still the version I got with the installation of my distro (Fedora Core
2).
I attached what phpinfo produced...
Am Mo, den 13.09.2004 um 17:20 Uhr +0300 schrieb Mulo Emmanuel:
 

Look at the phpinfo() page and see whether you find a section with 
information on MySQL.  If it isnt there, it is likely to do with the way 
you compiled AMP.

Christian Schlaefcke wrote:
   

Am Mo, den 13.09.2004 um 9:27 Uhr -0400 schrieb John Holmes: 

 

From: Christian Schlaefcke [EMAIL PROTECTED]
  

   

This is what I have in my php.ini
error_reporting  =  E_ALL
display_errors = On


 

Have you looked at a phpinfo() page to ensure you're editing the correct 
php.ini?

?php phpinfo(); ?
In the first block, it tells you what php.ini file PHP is using. If it just 
lists a directory, then that's where PHP expects to find the php.ini file.

---John Holmes... 
  

   

Yupp! And its 'is' the correct one.

 

--
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] Good PHP + MySQL Organizer

2004-09-14 Thread Martin Lam
Hi,

Like phpBB for newsgroups, phpMyAdmin for database administration.  Is
there one for Organizer?  Please advise!

Thanks,
Martin Lam

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



[PHP-DB] PHP 5 Error Handling

2004-09-14 Thread Joseph Crawford
Guys,

i have been working with custom exception classes that extend the
general exception.  Here is some code i have

   public function command($cmd) {
   if($cmd) {
   $res = fputs($this-connection, $cmd);
   $this-response = fgets($this-connection, 128);
   switch($this-getCode()) {
   case 500:
   throw new CommandException($cmd);
   break;
   }
   }
   }

   public function selectGroup($group) {
   $this-group = $group;
   if(substr($this-response,0,3) == 200) {

   THIS IS THE LINE THAT THROWS THE ERROR
   $this-command(NoSuchCommand\n);

   $this-response = fgets($this-connection, 1024);
   }
   $info = split( , $this-response);

   $this-first = $info[2];
   $this-last = $info[3];
   }

now when the error is thrown and i do $e-getLine(); it shows the line
of the file where the throw statement is.  Is there a way to make it
show the actual line number of the line that is the error? the
$this-command(NoSuchCommand\n); line.

-- 
Joseph Crawford Jr.
Codebowl Solutions
[EMAIL PROTECTED]
802-558-5247

For a GMail account
contact me OFF-LIST

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



[PHP-DB] MSSQL FOR XML AUTO php

2004-09-14 Thread Bozhan Boiadzhiev
Hello i have such problem
Executing this script
php code:
?php
session_start();
include ../msdb_conn.php;
  $stmt_page=mssql_init(GET_RESUME_AS_XML);
  mssql_bind($stmt_page,RETVAL,$returnval,SQLVARCHAR);
  $execute_stmt=mssql_execute($stmt_page);

echo mssql_num_rows($execute_stmt);
do {
 while ($row = mssql_fetch_array($execute_stmt)) {
 print_r($row);
 }
 } while (mssql_next_result($execute_stmt));
?
i have this log
freetds.log:
Starting log file for FreeTDS 0.62.4
   on 2004-09-13 21:13:23 with debug level 99.
names for ISO-8859-1: ISO-8859-1
names for UTF-8: UTF-8
names for UCS-2LE: UCS-2LE
names for UCS-2BE: UCS-2BE
iconv to convert client-side data to the ISO-8859-1 character set
21:13:23.147321 tds_iconv_info_init: converting ISO-8859-1-UCS-2LE
21:13:23.147476 tds_iconv_info_init: converting ISO-8859-1-UCS-2LE
21:13:23.147602 Connecting to 192.168.0.2 port 1433, TDS 8.0.
21:13:23.148371 tds_put_string converting 8 bytes of carredas
21:13:23.148535 tds_put_string wrote 16 bytes
21:13:23.148594 tds_put_string converting 2 bytes of sa
21:13:23.148642 tds_put_string wrote 4 bytes
21:13:23.148725 tds_put_string converting 7 bytes of PHP 4.0
21:13:23.148787 tds_put_string wrote 14 bytes
21:13:23.148828 tds_put_string converting 11 bytes of 192.168.0.2
21:13:23.148873 tds_put_string wrote 22 bytes
21:13:23.148915 tds_put_string converting 10 bytes of DB-Library
21:13:23.148961 tds_put_string wrote 20 bytes
21:13:23.149003 tds_put_string converting 10 bytes of us_english
21:13:23.149049 tds_put_string wrote 20 bytes
21:13:23.149092 tds_put_string wrote 0 bytes
21:13:23.149300 tds_process_login_tokens()
Received header @ 21:13:23.150005
 04 01 01 73 00 38 01 00-|...s.8..|
Received packet @ 21:13:23.150166
 e3 1b 00 01 06 6d 00 61-00 73 00 74 00 65 00 72 |.m.a .s.t.e.r|
0010 00 06 6d 00 61 00 73 00-74 00 65 00 72 00 ab 64 |..m.a.s. t.e.r..d|
0020 00 45 16 00 00 02 00 25-00 43 00 68 00 61 00 6e |.E.% .C.h.a.n|
0030 00 67 00 65 00 64 00 20-00 64 00 61 00 74 00 61 |.g.e.d.  .d.a.t.a|
0040 00 62 00 61 00 73 00 65-00 20 00 63 00 6f 00 6e |.b.a.s.e . .c.o.n|
0050 00 74 00 65 00 78 00 74-00 20 00 74 00 6f 00 20 |.t.e.x.t . .t.o. |
0060 00 27 00 6d 00 61 00 73-00 74 00 65 00 72 00 27 |.'.m.a.s .t.e.r.'|
0070 00 2e 00 07 57 00 49 00-4e 00 32 00 30 00 30 00 |W.I. N.2.0.0.|
0080 33 00 00 00 00 e3 08 00-07 05 09 04 d0 00 34 00 |3... ..4.|
0090 e3 17 00 02 0a 75 00 73-00 5f 00 65 00 6e 00 67 |.u.s ._.e.n.g|
00a0 00 6c 00 69 00 73 00 68-00 00 ab 68 00 47 16 00 |.l.i.s.h ...h.G..|
00b0 00 01 00 27 00 43 00 68-00 61 00 6e 00 67 00 65 |...'.C.h .a.n.g.e|
00c0 00 64 00 20 00 6c 00 61-00 6e 00 67 00 75 00 61 |.d. .l.a .n.g.u.a|
00d0 00 67 00 65 00 20 00 73-00 65 00 74 00 74 00 69 |.g.e. .s .e.t.t.i|
00e0 00 6e 00 67 00 20 00 74-00 6f 00 20 00 75 00 73 |.n.g. .t .o. .u.s|
00f0 00 5f 00 65 00 6e 00 67-00 6c 00 69 00 73 00 68 |._.e.n.g .l.i.s.h|
0100 00 2e 00 07 57 00 49 00-4e 00 32 00 30 00 30 00 |W.I. N.2.0.0.|
0110 33 00 00 00 00 ad 36 00-01 71 00 00 01 16 4d 00 |3.6. .qM.|
0120 69 00 63 00 72 00 6f 00-73 00 6f 00 66 00 74 00 |i.c.r.o. s.o.f.t.|
0130 20 00 53 00 51 00 4c 00-20 00 53 00 65 00 72 00 | .S.Q.L.  .S.e.r.|
0140 76 00 65 00 72 00 00 00-00 00 08 00 02 f8 e3 11 |v.e.r... |
0150 00 04 03 35 00 31 00 32-00 04 34 00 30 00 39 00 |...5.1.2 ..4.0.9.|
0160 36 00 fd 00 00 00 00 00-00 00 00|6... ...|
21:13:23.150658 looking for login token, got  e3(ENVCHANGE)
21:13:23.150697 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 12 from wire to give 6 to client.
tds_get_string: reading 12 from wire to give 6 to client.
21:13:23.150981 looking for login token, got  ab(INFO)
21:13:23.151034 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 74 from wire to give 37 to client.
tds_get_string: reading 14 from wire to give 7 to client.
21:13:23.151297 looking for login token, got  e3(ENVCHANGE)
21:13:23.151359 tds_process_default_tokens() marker is e3(ENVCHANGE)
21:13:23.153423 tds_iconv_info_init: converting ISO-8859-1-CP1252
21:13:23.153503 looking for login token, got  e3(ENVCHANGE)
21:13:23.153542 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 20 from wire to give 10 to client.
21:13:23.153616 looking for login token, got  ab(INFO)
21:13:23.153661 tds_process_default_tokens() marker is ab(INFO)
tds_get_string: reading 78 from wire to give 39 to client.
tds_get_string: reading 14 from wire to give 7 to client.
21:13:23.153811 looking for login token, got  ad(LOGINACK)
tds_get_string: reading 44 from wire to give 22 to client.
21:13:23.153902 looking for login token, got  e3(ENVCHANGE)
21:13:23.153947 tds_process_default_tokens() marker is e3(ENVCHANGE)
tds_get_string: reading 6 from wire to give 3 to client.
tds_get_string: reading 8 from wire to give 4 to client.
21:13:23.154051 looking for login token, got  fd(DONE)
21:13:23.154097 

Re: [PHP-DB] MSSQL FOR XML AUTO php

2004-09-14 Thread Robert Twitty
HI Bozhan

When you append the FOR XML clause at the end of a query, the xml data
will be sent in a single column result set. The column's type is ntext,
which is not easily handled by FreeTDS and PHP. The reason is because it
is UC2-2 encoded UNICODE text. UNICODE text is easier to deal with if it
is encoded using UTF-8. Somewhere in FreeTDS's docs it talks about how to
do this.

However, rather than using FreeTDS, I would suggest using ODBTP, which is
available at http://odbtp.sourceforge.net. One of its biggest strengths
and advantages over FreeTDS is UNICODE data and query processing. It had
no problems executing your FOR XML query.  It also provides support for
all of PHP's mssql functions, so you don't have to change your code.

-- bob

On Tue, 14 Sep 2004, Bozhan Boiadzhiev wrote:

 Hello i have such problem
 Executing this script
 php code:
 ?php
 session_start();
 include ../msdb_conn.php;


$stmt_page=mssql_init(GET_RESUME_AS_XML);
mssql_bind($stmt_page,RETVAL,$returnval,SQLVARCHAR);

$execute_stmt=mssql_execute($stmt_page);



 echo mssql_num_rows($execute_stmt);
 do {
   while ($row = mssql_fetch_array($execute_stmt)) {
   print_r($row);
   }
   } while (mssql_next_result($execute_stmt));
 ?

-- SNIP --

 but the only result is:
 1Array ( [0] = [XML_F52E2B61-18A1-11d1-B105-00805F49916B] = )



 a little simple example:

 PROCEDURE:

 CREATE   PROCEDURE PRINT_XML_DATA
 AS
 SELECT 'data' as col1
 FOR XML RAW
 GO

 executing this procdure form SQL Query Analyzer gives:
 XML_----(whaever)
 row col1=data/

 ?php

 include ../msdb_conn.php;

 /*
 $stmt_page=mssql_init( PRINT_XML_DATA);
 $execute_stmt=mssql_execute($stmt_page);
 */
 // I can execute this way too but whit same result 


 $query=mssql_query(exec  PRINT_XML_DATA);
 echo mssql_num_rows($query);


 /*
 while ($row = mssql_fetch_array($query)) {
print_r($row);
}
 */
 // I can execute this way too but whit same result 

  do {
while ($row = mssql_fetch_array($query)) {
print_r($row);
}

} while (mssql_next_result($query));
 ?

 and result is:
 Array ( [0] = [XML_F52E2B61-18A1-11d1-B105-00805F49916B] = )

-- SNIP --
 Can some one to tell me or to suggest me how i can do this thing.
 And where is the problem in PHP or in FreeTDS or in me:) ???

 Thanks
 Bozhan


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



[PHP-DB] MySql Client API still old version

2004-09-14 Thread squirrel
After installing MySQL 4.1.4-gamma, phpinfo() shows MySql client API
v3.23.49 and it needs to be updated to 4.1.  But I can't seem to get it
updated.  Please help.

I recompiled with:
  ./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.31
  make clean
  make
  make test
  make install

'make test' shows that it's using /usr/local/mysql/lib/mysql, but after
'make install' phpinfo() still shows old API version.  Output of 'make
install' is shown below:

[PEAR] Archive_Tar- already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR   - already installed: 1.3.2
[PEAR] DB - already installed: 1.6.2
[PEAR] HTTP   - already installed: 1.2.2
[PEAR] Mail   - already installed: 1.1.3
[PEAR] Net_SMTP   - already installed: 1.2.3
[PEAR] Net_Socket - already installed: 1.0.1
[PEAR] XML_Parser - already installed: 1.0.1
[PEAR] XML_RPC- already installed: 1.1.0



**
Computer problems? ...
..http://www.multibyte.net

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



Re: [PHP-DB] MSSQL FOR XML AUTO php

2004-09-14 Thread Bozhan Boiadzhiev
Thanks Robert
but one thing i can't understand.
As you can see in my first message
freetds log contains such thing:
--
19:32:55.245996 tds_put_string converting 23 bytes of exec 
GET_RESUME_AS_XML1
19:32:55.246050 tds_put_string wrote 46 bytes
Sending packet @ 19:32:55.246091
 01 01 00 36 00 00 01 00-65 00 78 00 65 00 63 00 |...6 e.x.e.c.|
0010 20 00 47 00 45 00 54 00-5f 00 52 00 45 00 53 00 | .G.E.T. _.R.E.S.|
0020 55 00 4d 00 45 00 5f 00-41 00 53 00 5f 00 58 00 |U.M.E._. A.S._.X.|
0030 4d 00 4c 00 31 00  -|M.L.1.|

19:32:55.246297 in dbsqlok()
Received header @ 19:32:55.246705
 04 01 00 c2 00 34 01 00-|.4..|
Received packet @ 19:32:55.246790
 81 01 00 00 00 01 00 63-00 10 00 00 01 00 78 00 |...c ..x.|
0010 28 58 00 4d 00 4c 00 5f-00 46 00 35 00 32 00 45 |(X.M.L._ .F.5.2.E|
0020 00 32 00 42 00 36 00 31-00 2d 00 31 00 38 00 41 |.2.B.6.1 .-.1.8.A|
0030 00 31 00 2d 00 31 00 31-00 64 00 31 00 2d 00 42 |.1.-.1.1 .d.1.-.B|
0040 00 31 00 30 00 35 00 2d-00 30 00 30 00 38 00 30 |.1.0.5.- .0.0.8.0|
0050 00 35 00 46 00 34 00 39-00 39 00 31 00 36 00 42 |.5.F.4.9 .9.1.6.B|
0060 00 d1 10 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
0070 00 00 00 00 00 00 00 00-00 00 00 24 00 00 00 3c | ...$...|
0080 00 72 00 6f 00 77 00 20-00 63 00 6f 00 6c 00 31 |.r.o.w.  .c.o.l.1|
0090 00 3d 00 22 00 64 00 61-00 74 00 61 00 22 00 2f |.=..d.a .t.a../|
00a0 00 3e 00 ff 11 00 c1 00-01 00 00 00 79 00 00 00 |... y...|
00b0 00 fe 00 00 e0 00 01 00-00 00   | ..|

If this information is ( if i can say it like this) already come to my 
machine
and i can read it in freetds.log  i don't think it's encoding problem.

*
*

Robert Twitty wrote:
HI Bozhan
When you append the FOR XML clause at the end of a query, the xml data
will be sent in a single column result set. The column's type is ntext,
which is not easily handled by FreeTDS and PHP. The reason is because it
is UC2-2 encoded UNICODE text. UNICODE text is easier to deal with if it
is encoded using UTF-8. Somewhere in FreeTDS's docs it talks about how to
do this.
However, rather than using FreeTDS, I would suggest using ODBTP, which is
available at http://odbtp.sourceforge.net. One of its biggest strengths
and advantages over FreeTDS is UNICODE data and query processing. It had
no problems executing your FOR XML query.  It also provides support for
all of PHP's mssql functions, so you don't have to change your code.
-- bob
On Tue, 14 Sep 2004, Bozhan Boiadzhiev wrote:
 

Hello i have such problem
Executing this script
php code:
?php
session_start();
include ../msdb_conn.php;
  $stmt_page=mssql_init(GET_RESUME_AS_XML);
  mssql_bind($stmt_page,RETVAL,$returnval,SQLVARCHAR);
  $execute_stmt=mssql_execute($stmt_page);

echo mssql_num_rows($execute_stmt);
do {
 while ($row = mssql_fetch_array($execute_stmt)) {
 print_r($row);
 }
 } while (mssql_next_result($execute_stmt));
?
   

-- SNIP --
 

but the only result is:
1Array ( [0] = [XML_F52E2B61-18A1-11d1-B105-00805F49916B] = )

a little simple example:
PROCEDURE:
CREATE   PROCEDURE PRINT_XML_DATA
AS
SELECT 'data' as col1
FOR XML RAW
GO
executing this procdure form SQL Query Analyzer gives:
XML_----(whaever)
row col1=data/
?php
include ../msdb_conn.php;
/*
   $stmt_page=mssql_init( PRINT_XML_DATA);
   $execute_stmt=mssql_execute($stmt_page);
*/
// I can execute this way too but whit same result 
$query=mssql_query(exec  PRINT_XML_DATA);
echo mssql_num_rows($query);
/*
while ($row = mssql_fetch_array($query)) {
  print_r($row);
  }
*/
// I can execute this way too but whit same result 
do {
  while ($row = mssql_fetch_array($query)) {
  print_r($row);
  }
  } while (mssql_next_result($query));
?
and result is:
Array ( [0] = [XML_F52E2B61-18A1-11d1-B105-00805F49916B] = )
   

-- SNIP --
 

Can some one to tell me or to suggest me how i can do this thing.
And where is the problem in PHP or in FreeTDS or in me:) ???
Thanks
Bozhan
   

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


Re: [PHP-DB] MSSQL FOR XML AUTO php

2004-09-14 Thread Bozhan Boiadzhiev
HAHAHAHA
i am so sorry this is so called problem infornt of computer.
i didn't look in source of page and becouse of XML it isn't shown in page.
Very sorry
Thanks
Bozhan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Sybase Peristent Connections Gotchas

2004-09-14 Thread Brian Foddy
I've been using PHP4/5 and Sybase for several years, using standard
sybase_connect.  Today I tried playing around with pconnect to get 
aquainted.

I expected one simple condition of a use database from one web page
affecting another, and easilly handled that with a connection wrapper that
re-uses the proper database with each reconnection.
A couple other more troublesome issues also quickly came up.
1.  Any #temp database tables are not destroyed between calls.  I can 
probably
work around this with some minor coding changes to manually drop temp 
tables.

2.  Any call to environmental set commands like set isolation remain 
in effect
after the web page is complete.  Again with some work I could probably 
recode some
pages to not change these values, or reset them when complete.

3.  The potentially most bothersome would be a page failing to call
commit tran/rollback tran, especially during some error condition.  Its 
easy to think
any uncommited tran is rolled back when the page exists.  But persistent 
connections
won't do this.  This could be a disaster by leaving open a transaction 
causing all
subsequent calls to never be commited...  I might be able to create some 
wrapper
that always resets the transaction state before starting??

I'm curious how others have attempted to solve these problems, and others
I haven't thought of yet.  Clearly many can be avoided by having clean code,
but just 1 exception...
Brian
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] MySql Client API still old version

2004-09-14 Thread Mikhail U. Petrov
1. Did you install MySQL-client or only MySQL-server?
2. Do you think I'm a telepath? Please, if you want good answers, tell, 
at least, your OS and PHP version.
  I can't help you without any information.
3. You choose wrong maillist for this question. Here are many 
php-programmers, but not system administrators.

Best wishes, MadMike.
http://www.madmike.ru/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Please help

2004-09-14 Thread Micah Stevens



WHERE columname LIKE condition

^^^ example.





On Friday 10 September 2004 10:22 am, Stuart Felenstein wrote:
 Okay, I was under the impression that where is
 implied inthe joins xx.xx = xx.xx .  Is that not the
 case ?
 As a matter of fact, there isn't even a where or like
 in my query.  Then again myabe that's why I can see
 *all* records but not run a search.

 Can you please provide an exmample of the column name
 bteween where and like ?

 Thank you.
 Stuart

 --- Micah Stevens [EMAIL PROTECTED] wrote:
  If you look at the query, there's no column name
  between 'WHERE' and 'LIKE'
  which is a syntax error. That's the problem.
 
 
  Looks like your sql generator has some issues, or
  you didn't specify the WHERE
  column properly. I'm not familiar with the system
  you're using, but keep in
  mind, that mysql_error will usually not steer you
  wrong.
 
  -Micah
 
  On Friday 10 September 2004 10:03 am, Stuart
 
  Felenstein wrote:
   I had not, my apologies.  I think your post
 
  slipped
 
   by.  Anyway, yes I have now inserted mysql_error()
 
  and
 
   got my return.  Though I'm not entirely sure how
 
  to
 
   fix it.
   Here is the error.
  
   You have an error in your SQL syntax. Check the
 
  manual
 
   that corresponds to your MySQL server version for
 
  the
 
   right syntax to use near 'Like 'ACCFIN'' at line 1
   SELECT `VendorJobs`.`JobID`,
   `VendorSignUp`.`CompanyName`,
   `StaIndTypes`.`CareerCategories`,
   `StaUSCities`.`City`, `USStates`.`States`,
   `VendorJobs`.`AreaCode`, `staTaxTerm`.`TaxTerm`,
   `VendorJobs`.`PayRate`,
 
  `staTravelReq`.`TravelReq`,
 
   `VendorJobDetails`.`Details`,
   `VendorJobs`.`PostStart`, `VendorJobs`.`JobTitle`
 
  FROM
 
   `VendorJobs` INNER JOIN `VendorSignUp` ON
   (`VendorJobs`.`VendorID` =
 
  `VendorSignUp`.`VendorID`)
 
   INNER JOIN `StaIndTypes` ON
 
  (`VendorJobs`.`Industry` =
 
   `StaIndTypes`.`CareerIDs`) LEFT OUTER JOIN
   `StaUSCities` ON (`VendorJobs`.`LocationCity` =
   `StaUSCities`.`CityID`) LEFT OUTER JOIN `USStates`
 
  ON
 
   (`VendorJobs`.`LocationState` =
 
  `USStates`.`StateID`)
 
   LEFT OUTER JOIN `staTaxTerm` ON
   (`VendorJobs`.`TaxTerm` =
 
  `staTaxTerm`.`TaxTermID`)
 
   INNER JOIN `staTravelReq` ON
 
  (`VendorJobs`.`TravelReq`
 
   = `staTravelReq`.`TravelReqID`) INNER JOIN
   `VendorJobDetails` ON (`VendorJobs`.`JobID` =
   `VendorJobDetails`.`JobID`) where Like 'ACCFIN'
 
  limit
 
   0,1
  
   --
  
   --- Micah Stevens [EMAIL PROTECTED]
 
  wrote:
did you make the change to the code I suggested?
What does MySQL say the error
is?
   
-Micah
   
   
On Friday 10 September 2004 07:49 am, Stuart
   
Felenstein wrote:
 As I said this is a code generator
 
  (dbqwiksite).
 
So,
   
 describing the process for creating the code
 
  is
 
 different.  The $sql is fine, as far as typos
 
  or
 
 incorrect characterrs.  I've gone through
 
  those
 
 statement very carefully.
 I've also tried to run a debug with no luck.
 But I do know that there is something wrong
 
  with
 
the
   
 statement, since I can get a complete display
 
  of
 
all
   
 records, but can't search using criteria.

 Below is the $sql, one I know works , though
 
  I've
 
 tried others.  VendorJobs is the table I'm
   
querying ,
   
 and since it's made up of values from other
 
  static
 
 type tables I have all the joins in place.

 I've also taken the tick marks out, thinking
 
  maybe
 
it
   
 was a style issue.  I'm not sure where to go
 
  with
 
it.
   
 Getting a response from the company is like
 
  pretty
 
 difficult.

   `VendorJobs`.`JobID`,
   `VendorSignUp`.`CompanyName`,
   `StaIndTypes`.`CareerCategories`,
   `StaUSCities`.`City`,
   `USStates`.`States`,
   `VendorJobs`.`AreaCode`,
   `staTaxTerm`.`TaxTerm`,
   `VendorJobs`.`PayRate`,
   `staTravelReq`.`TravelReq`,
   `VendorJobDetails`.`Details`,
   `VendorJobs`.`PostStart`,
   `VendorJobs`.`JobTitle`
 FROM
   `VendorJobs`
   INNER JOIN `VendorSignUp` ON
 (`VendorJobs`.`VendorID` =
   
`VendorSignUp`.`VendorID`)
   
   INNER JOIN `StaIndTypes` ON
   
(`VendorJobs`.`Industry`
   
 = `StaIndTypes`.`CareerIDs`)
   LEFT OUTER JOIN `StaUSCities` ON
 (`VendorJobs`.`LocationCity` =
   
`StaUSCities`.`CityID`)
   
   LEFT OUTER JOIN `USStates` ON
 (`VendorJobs`.`LocationState` =
   
`USStates`.`StateID`)
   
   LEFT OUTER JOIN `staTaxTerm` ON
 (`VendorJobs`.`TaxTerm` =
   
`staTaxTerm`.`TaxTermID`)
   
   INNER JOIN `staTravelReq` ON
 (`VendorJobs`.`TravelReq` =
 `staTravelReq`.`TravelReqID`)
   INNER JOIN `VendorJobDetails` ON
 (`VendorJobs`.`JobID` =
   
`VendorJobDetails`.`JobID`)
   
 Stuart

 --- Philip Thompson [EMAIL PROTECTED] wrote:
  I 

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

2004-09-14 Thread Micah Stevens

I'm thinking you should either get a better code generator, or learn more 
about php.. :) 

-Micah

On Monday 13 September 2004 02:49 pm, Stuart Felenstein wrote:
 Thanks to help here I was able to overcome some ivalid
 query errors.

 Now I'm back, (probably the same mistake)

 It's coming off of this line:

 $sql .=  And
 PostStart = DATE_SUB(CurDate(), Interval
 ['search_fd1'] day );

 The 'search_fd1' is one of the form fields where a
 list of values is chosen from.  Perhaps I will try the
 search_optfd1

 ?php
 if ((!isset($_GET[search_fd1])) 
 (!isset($_POST[search_fd1]))) {
 $itemvalue = ;
 } else {
 $itemvalue = qsrequest(search_fd1);
 }

 $cellvalue = select
 name=\search_optfd1\option value=\=\ .
 qscheckselected(=,$arryopt[1],selected) . less
 or equal/option/select
 select name=\search_fd1\option value=\\ .
 qscheckselected(,$arryitemvalue[1],selected) .
 Please Select/option . qsmysqlgen_listbox(
 Select Distinct `DaysID`,`Days` From staDays
 ,search_fd1,DaysID,Days,$arryitemvalue[1]) .
 /select . input type=\hidden\
 name=\multisearch_fd1\ value=\\;
 if ($cellvalue == ) {
 $cellvalue = nbsp;;
 }
 print td class= . $css_class .  align=Default

  . $cellvalue . /td;

 ?

 I hope my question makes sense. I didn't write this
 code AND I have little knowledge of PHP.

 Thank you,
 Stuart

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



Re: [PHP-DB] php and oracle

2004-09-14 Thread Christopher Jones
Dieter,
Can you share some of your migration experiences?  Why did you migrate
to Oracle and what problems did you face?
Miscellaneous thoughts follow:
Regarding the error, search the bdump trace files for 3114 or other
ORA-xyz errors.  You may need to get Oracle Support involved if there
are any.
Your trace file dir seems huge.  The Administrator's guide has some
info about controlling the sizes:
http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10739/manproc.htm#sthref655
Effectively you delete what you don't need.
Hopefully PHP5 will stabilize quickly.
I recall a stern warning in the PHP manual about not using Apache 2.
I can't find it currently - anyone know if it has been rescinded?
The troubleshooting FAQ mentions restarting Apache occasionally to
avoid connection problems.
(See 
http://www.oracle.com/technology/tech/opensource/php/php_troubleshooting_faq.html#conmgt)
I feel that the Oracle-PHP community needs to get together and work on
through the various connection issues.  Anyone want to participate?
Chris
D.Wilkening wrote:
Hi,
we are not really trained in analyzing Oracle-logs. I've been using Mysql
and Mssql for years, but the migration was more difficult, than I thought.
In $ORACLE_HOME/admin/%database% I have Gigabytes of logs, so do not know,
where to start...
du -sch *
1.5Gbdump
166Mcdump
28K create
8.0Kpfile
282Kudump
1.7Gtotal
well, for the apache-problem, I've found an solution (not the straight
way, but it seems to work so far):
using apache_child_terminate doesn't work (probably apache2 compiled
against nptl (linux kernel 2.6), apache_child_terminate doesn't work in an
multi-threaded env)
so I cought the php-error using set_error_handler. Inside of this
error-method, I did an posix_kill(getmypid(),15);
I know, I won't win the programmers Nobel-Prize for that crap, but it
works so far; dropped connections are reconnected.
Dieter

Christopher Jones sagte:
D.Wilkening wrote:

Hi everyone,
i've a problem using php with oracle 10g.
(php 5.0.1 compiled against Oracle 10.1.0.2-libs, apache2 and apache1)
One or two days, everything looks good. Then, by pressing (once a
second)
reload in your browser, you sometimes get an
ERROR #: 2
ERROR DESC: oci_execute() [a
href='function.oci-execute'function.oci-execute/a]: OCIStmtExecute:
ORA-03114: Nicht mit ORACLE verbunden
restarting apache solves the problem, but is no real option.
My first idea was the connection pooling, so i tried a ocilogon instead
ociPlogon, but the problem dodn't solve.
Any Ideas?
Thank you in advance
Are there any clues in the database trace files?
Chris

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


[PHP-DB] Accessing Matisse DB

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


Re: [PHP-DB] Sybase Peristent Connections Gotchas

2004-09-14 Thread Jeff Moss
The biggest problem I've had with persistent connections is the problems 
that arise when the connection goes down. You have to monitor the 
connection status anyways (and reconnect on a failure), so it was 
usually easier to just connect every time. I don't know if this is 
specific to sybase. You also avoid headache dealing with multiple 
connections per process. Over a local ethernet this was usually such a 
short delay that it didn't matter. Typically I don't care much for 
speed, you avoid a lot of headache avoiding the persistent connections, 
but the tradeoff is speed of course.

It seems to make a lot more sense to me to just reset the handle to drop 
all temp tables and that.

As for the transactions, I think as long as you do the transaction all 
at once there would be no problem right? If it was a problem in the 
middle of a socket write, chances are the socket closed also, right?

-Jeff
Brian Foddy wrote:
I've been using PHP4/5 and Sybase for several years, using standard
sybase_connect.  Today I tried playing around with pconnect to get 
aquainted.

I expected one simple condition of a use database from one web page
affecting another, and easilly handled that with a connection wrapper 
that
re-uses the proper database with each reconnection.

A couple other more troublesome issues also quickly came up.
1.  Any #temp database tables are not destroyed between calls.  I can 
probably
work around this with some minor coding changes to manually drop temp 
tables.

2.  Any call to environmental set commands like set isolation 
remain in effect
after the web page is complete.  Again with some work I could probably 
recode some
pages to not change these values, or reset them when complete.

3.  The potentially most bothersome would be a page failing to call
commit tran/rollback tran, especially during some error condition.  
Its easy to think
any uncommited tran is rolled back when the page exists.  But 
persistent connections
won't do this.  This could be a disaster by leaving open a transaction 
causing all
subsequent calls to never be commited...  I might be able to create 
some wrapper
that always resets the transaction state before starting??

I'm curious how others have attempted to solve these problems, and others
I haven't thought of yet.  Clearly many can be avoided by having clean 
code,
but just 1 exception...

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