Re: [PHP-DB] Passing Objects

2001-05-10 Thread Joe Brown

Nope.

something like this may get you where you want to go though

  include(myObjectClassDeclaration);
  $myInstance=new myObject;
  echo
http://blahblah.com/?passedClass=.urlencode(serialize($myInstance));

Then in subsequent pages this should work:

  include(myObjectClassDeclaration);
  $myInstance=unserialize($passedClass);


[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 does this make sense?

 assuming:

 class myObject
 {
 $var1 = A;
 $var2 = B;
 }

 http://blahblah.com/?passedClass=myObject

 would passedClass also send with it being an oject both variables and the
 rest of the class defined?

 --
 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]




-- 
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] Sessions ???

2001-05-02 Thread Joe Brown

Doh!
I meant there is NO dire need
Joe Brown [EMAIL PROTECTED] wrote in message
9cp3kv$3hj$[EMAIL PROTECTED]">news:9cp3kv$3hj$[EMAIL PROTECTED]...
 For this operation there is dire need for session management.

 And remember the default variable order EGPCS may cause you trouble if
 you're sending a put variable across with the same name as a session
 variable.  Session vars take presidence in the global scope.

 http://localhost/forums/view.php?topicID=3

 The session var $topicID will override this put variable.

 $topicID=session var value //your 3 may not be here.
 $HTTP_GET_VARS[topicID]=3 //you can still find your 3 here.

 Session variables are good for maintaining information from one page to
the
 next, avoiding the need for the client to keep sending the same
information
 over and over again.

 In either event, I recommend useing a different session variable name than
 the put variable's name, unless you use $HTTP_GET_VARS/$HTTP_SESSION_VARS
 accordingly.

 -Joe

 DC [EMAIL PROTECTED] wrote in message
 9covu3$p6g$[EMAIL PROTECTED]">news:9covu3$p6g$[EMAIL PROTECTED]...
  Hi All
  I have a ? about setting a session.
 
  I have a functions.inc file and at the top have put my session statment
 that
  looks like this.
 
  ?
  session_start();
  session_register($topidID);
  ?
 
  $topicID comes from my mysql db.
 
  What i am trying to do is set the $topicID of my message board so that
 when
  a sucessful post has been made the visitor can click on a link that show
 the
  right board by topicID.
 
  so the link will look like this...
 
  http://localhost/forums/view.php?topicID=3
 
  I am banging away trying to make this work
 
  Any help in the meantime is as always appreciated
 
  Thank You In Advance
 
  dave C
 
 
 
  --
  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]
 



 --
 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]




-- 
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] undefined index

2001-05-01 Thread Joe Brown

I don't think dropping the quotes is the best solution.

One might consider dropping the warning level in php.ini, if it is a
problem, or use numbered array like mysql_fetch_row() returns.

-Joe

Henning Kilset Pedersen [EMAIL PROTECTED] wrote in message
000f01c0d251$59b79000$a26547c1@pedershk">news:000f01c0d251$59b79000$a26547c1@pedershk...
 Hi!

 Drop the quotes around your array keys. It should be $row[imageurl] for
 example.



 --
 Henning Kilset Pedersen
 Anarchy Online Server Operations
 Oracle, PHP, e-Commerce etc.
 Funcom Oslo AS
 -Original Message-
 From: Petra [mailto:[EMAIL PROTECTED]]
 Sent: 1. mai 2001 03:29
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] undefined index



 hi to all

 I try to get data listed out of my database with the statement

 ...
 while ($row = mysql_fetch_array($sql)) {

 $image = $row[imageurl];
 $id = $row[productID];
 $name = $row[cdescription];
 ...

 If i havent got anything in that field in my database I get the error
 message in my browser

 Undefined index: imageurl in ...

 How can I overcome that problem? Is there a way to define a index if that
 occurs and make it to not produce that error message?

 Hope I have explained it understandable enough. If you need to know more
 details let me know, I would appreciate any help I could get. Thanx

 P.


 --
 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]




-- 
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] Intialize PHP Module on Windows98

2001-04-30 Thread Joe Brown

Looks like you've got different versions for php and your modules.

Since php is the oldest, make sure you have the newer php4isapi.dll and
php4ts.dll in the system directory, or wherever you installed them.

Benny [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a problem on intializing PHP module.
 I've installed PHP on my windows 98 system. I used PWS.
 I placed php on c:/Php.
 My home directory is c:/Inetpub/myfolder.
 This is the php.ini, Paths and Directories section :
   doc_root = c:/Inetpub/myfolder
   extension_dir = c:/Php/extensions
 This is the registry :


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Scrip
 t Map]
   .php=c:\\Php\\sapi\\php4isapi.dll
 When I try phpinfo(), I received message like this :
   dbase: Unable to initialize module
   Module compiled with debug=0, thread-safety=1 module API=20001214
   PHP compiled with debug=0, thread-safety=1, module API=2609
   These options need to match
 That's for dbase module, and for the others module it gave the same
result.

 Anyone could help me to solve this problem ?

 Regards;

 Benny.



 --
 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]




-- 
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] Executing a PL/SQL Function

2001-04-30 Thread Joe Brown

Does the database user your logging in as have execute permissions for that
procedure?

Marcelo Dias de Toledo [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Here is the code:

 $stmt = OCIParse($conn,BEGIN prontolog.pc_int.pedido(:p_cgc_lweb,
 :p_id_cliente, :p_id_pedido, :p_id_transp, :p_contrato, :p_dt_emissao,
 :p_dt_chegada, :p_dt_entrega, :p_vl_frete, :c_nome, :c_fone1, :c_fone2,
 :c_fax, :c_email, :c_endereco_f, :c_bairro_f, :c_cep_f, :c_cidade_f,
 :c_estado_f, :c_nome_e, :c_endereco_e, :c_bairro_e, :c_cep_e,
 :c_cidade_e, :c_estado_e, :p_id_conpag, :v_observa); END;);

 OCIBindByName($stmt, :p_cgc_lweb, $p_cgc_lweb, 150);
 OCIBindByName($stmt, :p_id_cliente, $p_id_cliente, 150);
 OCIBindByName($stmt, :p_id_pedido, $p_id_pedido, 150);
 .
 .
 .

 $p_cgc_lweb = 04284227000167;
 $p_id_cliente = 29334988800;
 $p_id_pedido = 0001;
 $p_id_transp = 00926551000180;
 $p_contrato = numero do contrato da transportadora;
 $p_dt_emissao = date(Y-m-d H:i:s);
 $p_dt_chegada = date(Y-m-d H:i:s);
 .
 .
 .

 OCIExecute($stmt);

 print (($v_observa));

 prontolog is the schema
 pc_int is the package
 pedido is the function

 And this is the exacly output
 ---//---
 Warning: OCIStmtExecute: ORA-06550: line 1, column 7: PLS-00221:
 'PEDIDO' is not a procedure or is undefined ORA-06550: line 1, column 7:
 PL/SQL: Statement ignored in /www/htdocs/mariamercado/teste.phtml on
 line 64
 (())
 ---//---

 Can I execute functions ? If yes, what may be wrong ?

 Thank you very much,
 --
 Marcelo Dias de Toledo
 N-Web E-Commerce - http://www.nweb.com.br
 mailto:[EMAIL PROTECTED]
 Phone: 55 71 341-8474 - Fax: 55 71 341-8480

 --
 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]




-- 
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] Advice On Building Dynamic MySQL Queries

2001-04-19 Thread Joe Brown

My solution was almost as elegent...

  $query="select * from customers";
  $queryand=false;
  if(!empty($f_Account)) {
$query.=" WHERE upper(P.Account) like upper('$f_Account')";
$queryand=true;
  }
  if(!empty($f_First_Name)) {
$query.=($queryand?" AND ":" WHERE ")."upper(p.First_Name) like
upper('$f_First_Name')";
$queryand=true;
  }
...

For searchs, case doesn't matter (in my example), but you do need to index
your table accordingly for best results.

Also note upper() is the oracle uppercase function.  I believe the uppercase
function varies from one RDBMS to another.

"Victor Foitzik" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello JD,
 on 19.04.2001 you wrote:

   if (!empty($Price))
   {
  if(empty($whereclause))
   {
   $whereclause.="Price$Price";
   }
   else
   {
  $whereclause.=" AND 'Price $Price";
  }
   }

 and even better would be:

 if (!empty($$varname)) {
$whereclause .= ($whereclause ? ' AND ' : '').
 "$varname =" . $$varname;
 }

 or something like this ;-)

 HTH
 Vic



 --
 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]




-- 
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] date_format for Oracle

2001-04-11 Thread Joe Brown

Also consider the oracle sql

ALTER SESSION SET NLS_DATE_FORMAT='-MM-DD HH24:MI:SS'

or whichever format you prefer.

This sets the default format returned when selecting a date column.

-Joe

"Steve Farmer" [EMAIL PROTECTED] wrote in message
news:p04320402b6fa8a7ffc70@[203.28.219.179]...
 Hi Richard,

 try TO_DATE or TO_CHAR , depending upon what you are trying to do,
 there are about 2 pages of formatting options for these functions.

 HTH
 Steve
 At 10:12 PM + 11/4/01, Richard Crawford wrote:
 This isn't strictly a PHP question, I suppose... but is anyone aware of a
 date_format function for Oracle comparable to MySQL's date_format()
function?
 
 --
 ---
 "Minds are like parachutes, they work best when open"
 Support free speech; visit http://www.efa.org.au/

 Heads Together Systems Pty Ltd http://www.hts.com.au
 Email: [EMAIL PROTECTED] Tel: 612 9982 6767 Fax: 612 9981 3081

 --
 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]




-- 
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] Still not - Display data begin with A

2001-04-07 Thread Joe Brown

Put the percent symbol inside of the single quotes:

$result = mysql_query("SELECT * FROM mydata WHERE name like '$begin%'
",$db);

"Naga Sean" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 It still not working
 I want to get the result of people with the first later is "A" in my
database

 Here is my syntax :

 $result = mysql_query("SELECT * FROM mydata WHERE name like
'$begin'%",$db);

 the $begin is from the URL link

 www.sample.com/name?begin=a


 Thanks


 --- "Frank M. Kromann" [EMAIL PROTECTED]
  wrote:
 wyoy could use a SQL statement like this:
 
 select * from myTable where LastName like "A%"
 
 - Frank
 
  Guys,
 
  How to view the result from the table.
  If I only want to display persons begin with letter A in the front.
 
 
 
  _
  www.kaskus.com - FREE EMAIL SERVICE
 
  --
  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]
 
 
 

 _
 www.kaskus.com - FREE EMAIL SERVICE

 --
 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]




-- 
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] ocibindbyname: ORA-01008: not all variables bound

2001-04-05 Thread Joe Brown

Don't have a whole lot of practice with the OCIBindByName function, but I
seem to be having success within a recursive select statement.

I'm not useing the  operator in my implementation.  Don't know if that's a
good or a bad thing (yet), but it seems to be functioning properly.

The third parameter you have -1.  I think you want to set it to a legitimate
max field length value.  -1 is used for LOBs, ROWID and FILENAME parameters,
not run of the mill number and varchar2 fields.

perhaps:
OCIBindByName($parsed,":id",$id,32);  //may work better?

""Paul Fernandez"" [EMAIL PROTECTED] wrote in message
9ai699$n70$[EMAIL PROTECTED]">news:9ai699$n70$[EMAIL PROTECTED]...
 Hello,

 The goal here is to insert a single row, then get a numerical value "id"
 (generated by the insert trigger) to use in another insert statement.

 I get, "ORA-01008: not all variables bound" when running this script:

 ?
 $query = "insert into table (col1, col2) values ($val1,$val2) returning id
 into :id";
 $parsed = OCIParse($connection,$query);

 OCIBindByName($parsed,":id",$id,-1);

 // execute first insert
 $cursor = OCIExecute($parsed);

 // construct and execute 2nd insert
 $query2="insert into table2(id,etc) values (:id, $etc)";
 $parsed2 = OCIParse($connection,$query2);
 $cursor2 = OCIExecute($parsed2);
 ?

 It seems so simple.  What am I doing wrong?

 Paul Fernandez



 --
 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]




-- 
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] Validating forms

2001-04-03 Thread Joe Brown

Do both, javascript and server side validation.

Javascript can cut down on unnessary page refreshes.

Serverside is the only way to guarentee the results, because of the reasons
outlined here.

Yes, it's more work, but it will provide a better experience for the end
surfer.  No?

-Joe

""B. van Ouwerkerk"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 It is much more efficient to do that type of validation client-side,
using
 Javascript.  No
 sense in making another round trip to the server if not necessary.

 True.. but this only works if your visitor has javascript enabled.. the
 biggest avantage in serverside scripting IMHO is you can forse things to
 happen.. Besides, a visitor with a rather old browser might get bombed
with
 javascript errors..

 An if .. then loop will do the same but.. serverside.

 Bye,


 B.


 --
 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]




-- 
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] metabase support

2001-04-02 Thread Joe Brown

I am a little less biased ;-)

I think Manuel's Metabase is the bomb.  Unfortunatly, so does Windows...

Metabase provides some truely wonderful features.  On Windows, Metabase with
OCI8 my server keep performing illegeal instructions.  I think this is a
lack of PHP's maturity on Win32,  not Metabase's fault.

On linux, web pages work wonderfuly with Metabase.  Needing to support a
Windows Server, so I'm working on going back and yanking out Metabase.  This
is where I am learning that Metabase really is nice.  OCI* functions by
themself are not nearly as convenient as Metabase functions.  I expect this
is true of most databases and PHP.

Kudos Manuel!

There is a bit of a learning curve with Metabase, but the curve exists for
all the independent database functions as well.  Tempted to use PEAR
implementation, but fear it Would suffer the same dilemma as Metabase on
Windows and it's not nearly as mature as Metabase.

-Joe


- Original Message -
From: ""Dean Hall"" [EMAIL PROTECTED]
Newsgroups: php.db
Sent: Monday, April 02, 2001 1:36 AM
Subject: Re: [PHP-DB] metabase support



 ""Manuel Lemos"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I just want to make sure that I'm understanding what metabase supports.
 
  It does not support:
  - references
  - primary keys
 
  Does anyone find that this prevents you from using metabase? Or do you
 find
  that you have to hack your way around these deficiencies?
 
  You can live perfectly well without both.
 
  In practice primary keys are not much more than declaring a unique index
 on
  the key fields.
 
  References or foreign keys have a role of assuring database integrity.
  This means that if you update your database tables and not assure that
  specified references exist consistently, the DBMS will fail on those
  updates.
 
  It's not like it will avoid your application bugs, but at least if your
  application has a bug that would break the database integrity, well
placed
  references/foreign keys will prevent that to happen.  Your application
 will
  just stop working until you fix the bugs.
 
  I use MySQL most of the time, so I've learned to design without
explicit
  references, but I'd like to have the opportunity to at least specify
  references in the schema definition (which MySQL allows but doesn't do
  anything with). It seems that with a DBMS-independent abstraction layer
 like
  metabase something like this should be supported.
 
  Support for primary/foreign keys is in my to do list.  It just did not
  become a priority because there are other things more important to add
 like
  BLOBs.
 
  Metabase is about to go Open Source.  I am just waiting to finish a
great
  design tool before I announce when Metabase will be open for other
  developers to contribute with work that I can't do right away.
 
  Anyway, that should not stop you from using Metabase as it is.  Metabase
 is
  the only PHP database abstraction package that does schema management.
 You
  can live without schema management, but it provides great schema
  maintenance aid.
 
  When support for primary/foreign keys is added explicitly you will be
able
  to upgrade your schemas without worry.  So, you can use Metabase with
  schema management as it is now.
 
 
  Regards,
  Manuel Lemos

 Thanks for your comments, Manuel. I will consider them. However, I was
 wondering if anyone else who is less biased :-) wanted to comment on my
 questions.

 Thanks.
 Dean Hall.



 --
 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]





-- 
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] Indexing help

2001-03-27 Thread Joe Brown

Columns used in the WHERE clause is the good identifier for which columns to
index.  You don't want to index every column you select.

Typically adding indexes decreases insert performance.  The more indexes the
slower inserts operate, because the indexes also must be updated.

Adding an index to a column which is used in a where clause can dramatically
increase table row selection.  The database server does not have to scan the
full table, instead it can use the index to lookup which rows to return.

On small static tables the performance gain can be nominal.  Larger tables
where there are a lot of rows to check for a match, will see the largest
performance gain.

Think of a dictionary.  You already know the index: words are alphabetically
sorted.  Just think if it wasn't, you'd have to look at every word to see if
you've got a match.  Without indexes, that's what the computer has to do.
The computer (dbms) picks which index to use based on whats column in the
where clause.

Order By clauses can also benifit from an index.

-Joe

""Steve Brett"" [EMAIL PROTECTED] wrote in message
99pjr2$20s$[EMAIL PROTECTED]">news:99pjr2$20s$[EMAIL PROTECTED]...
 replies below:


 ""M. Verheijen"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear reader,
 A newbie mysql/php-question here! I've filled a mysql-database with about
 1600 records. All these records contain items which
 are on sale on a website. Every row contains an integer defining the
 category to which a item belongs.

 At the left of the website there are buttons linked to a php-page which
does
 a selection like this:
 select * from PRODUCTS where SUBCODE = \"$SUBCODE\"

 As you might have guessed, every button is a link in the form of:
 a href="products.php?SUBCODE=8"img src="../button2.gif" border="0"/a

 This all works well, but now my questions!
 Is it wise to make an index for the integer column? I assume it is because
 it's the row almost all queries are using in there where-statements. What
 kind of speed increase can I expect, will it increase the speed of query's
 if the workload goes to 2000 queries a hour? What's the best way to make
 this index, how does it works.

 
 i always work on the theory that i index columns that i use in the select
 section of a query, or a where.
 keys will be indexed automatically (AFAIU).
 the speed increase will be dramatic. i used postgres and didn't index a
 field (accidently) and then ran queries.then indexed it and the speed
 increase is huge.
 as for making indexes it depends what tools you use. most tools such as
 mysql-admin etcc will let you create indexes by a pointy clicky interface.
 true purists might insist on:

 CREATE [UNIQUE] INDEX index_name ON table [USING acc_name]

 from the sql command line.

 

 I've read about the use of indexes in the mysql-manual and phpbuilder.net,
 but both are kind of short and don't tell what
 you're doing exactly. Anybody of you have some pointers to good
webresources
 about indexing.

 
 i don't think you need to get into what particular type of index it is
 (hash, etc) but they are generally a good thing.
 

 Yes, I know a long list of questions ;) I hope that some of you can give
me
 a clue or two.

 
 log lists of questions are a good thing and should be warmly welcomed by
 everyone.
 


 With best regards,
 Maarten Verheijen


 --
 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]




 --
 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]




-- 
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] get_browser()

2001-03-27 Thread Joe Brown

Is it easier to update every web page you code with
get_env("HTTP_USER_AGENT") ; or easier to grab a new browser.ini file?

""Simon R Jones"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hi all
 how does everyone feel about the get_browser function?? Is the general
 impression it's overkill, and also flawed since it depends on the
 browser.ini file being up to date, or it is widely used?

 I'm about to need to use browser detection  I'm wondering if a simple
 get_env("HTTP_USER_AGENT") will be far simpler

 thanx in advance..
 si

  ---
  Studio 24 Ltd   |   tel. 01223 501 892
  PO Box 88   |   fax. 0870 063 1216
  Cambridge   |   mob. 07974 074 547
CB4 1XH   |   www.studio24.net


 --
 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]




-- 
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] Transmitting Arrays

2001-03-21 Thread Joe Brown

hmm...

looks like you're trying to use
seralize(var_name);
with out assigning a value to a holder variable.

$holder=seralize($var_name);

will probably get you further along.
also, try:
$var_name=unseralize($holder);
for the return trip.  same goes for urlencode/decode; though you can do two
steps in one.

$holder=urlencode(seralize($var_name));
$var_name=unseralize(urldecode($holder));

Might also want to use htmlentities():
echo "a href=next.html?holder=".htmlentities($holder)."next/a";

gl,
-Joe

""Mark Collin"" [EMAIL PROTECTED] wrote in message
01f501c0b186$f82da990$4134fea9@effigia">news:01f501c0b186$f82da990$4134fea9@effigia...
 I have a form which dynamically builds a table by taking data out of a
mysql
 database

 http://www.fyrespray.net/screenshots/admin/modifyscreenshot.php4?pageid=1

 but i'm having problems whn i try to modify the data i'm trying to put all
 the data into arrays serialize it, urlencode it then send it on to the
next
 page to put it into database and then send back to the original page when
 its done, i'm having a problem actually sendig my arrays around though,
the
 second page doesn't seem to get any data after i have unserialized it and
 urlunecoded it.

 anyone have any ideas, i've been fiddleing about a load with the code and
 there is a good chance i have totally messed it up now heres the state its
 in atm though if you would like to look

 http://www.fyrespray.net/screenshots/admin/modifyscreenshot.txt
 http://www.fyrespray.net/screenshots/admin/modify.txt

 (prolly need to save the first page if your browser is picking up the html
 bits and making half of a web page up like mine does)


 --
 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]




-- 
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] How to display HTML code?

2001-03-19 Thread Joe Brown

try:
?php
echo htmlentities("A HREF=home.phpHome/A");
?
""Osman Omar"" [EMAIL PROTECTED] wrote in message
00f901c0b0cf$c99e7da0$da604a2b@sony">news:00f901c0b0cf$c99e7da0$da604a2b@sony...
 Hi,

 Suppose I want to display HTML code eg "A HREF=home.phpHome/A"

 How can I do that in php?


 --
 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]




-- 
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] Line breaks in output

2001-03-19 Thread Joe Brown

Better yet, use "br" for browsers.
Or use Jeff's method but use nl2br function to convert new line to br

echo nl2br($result);

""JJeffman"" [EMAIL PROTECTED] wrote in message
007f01c0b0d8$212e97a0$5bd4d7c8@jjeffman">news:007f01c0b0d8$212e97a0$5bd4d7c8@jjeffman...
 Create a variable to concatenate the item values adding a "\n" character
 between them :

 $result = $item1."\n".$item2."\n".$item3 ;
 .
 echo("input name=text value=".$result . "");

 HTH

 Jayme.

 -Mensagem Original-
 De: Martin Skjöldebrand [EMAIL PROTECTED]
 Para: [EMAIL PROTECTED]
 Enviada em: segunda-feira, 19 de março de 2001 17:47
 Assunto: [PHP-DB] Line breaks in output


  Newbie here.
 
  How do I get line breaks in output from a database?
  I have a list of things in a file, like: item1``item2``item3 (etc)
  I want them displyed in a textarea as:
  item1
  item2
  item3
 
  Probably very simple, haven't got that far in my book yet.
 
  Martin S.
 
  --
  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]
 


 --
 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]




-- 
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] mail() headers

2001-03-19 Thread Joe Brown

I believe mail works completely different on unix.  It probably doesn't
suffer the same problems, because it's a direct call to an external process.

Lookup "sendmail"

""Free Beachler"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Someone else has tested this on Apache on windows 2000.  it broke under
the
 described conditions, i.e., 4th parameter of mail() function exceeds
approx.
 4K.  Remember, the 4th paramter is the "add'l headers" parameter and is
 essential for mime multipart messages.

 (ok, actually I think that if (the header + message stuff generated by
 mail())  4K --then break!!!)

 can someone try my scenario on unix?
 furthermore, is there something in the RFCs that limits message headers to
 4K???  Seems like there shouldn't be...

 -fre


 --
 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]




-- 
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] metabase documentation or samples

2001-03-17 Thread Joe Brown

http://phpclasses.upperdesign.com/browse.html/package/20

To my knowledge, this is the home page for metabase.  Manuel has done a
wonderful job putting together a documentation and a tutorial.

""Dean Hall"" [EMAIL PROTECTED] wrote in message
98usbh$li8$[EMAIL PROTECTED]">news:98usbh$li8$[EMAIL PROTECTED]...
 Anyone know where I can find documentation or sample-usage for metabase?
 It's not on sourceforge or the metabase homepage.

 Dean.



 --
 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]




-- 
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] PHP how to compare?

2001-03-15 Thread Joe Brown

No, two is a more accurate comparison.
!==
Although for most cases != is sufficient.

""Richard S. Crawford"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 use just one = sign.  So,

 if ($PASS != $PASSNOG) {...


 At 01:41 AM 3/15/01 +0100, Duky wrote:
 Hmm.. maybe I wasn't clear enough... what I want is to check is WHEN the
 two passwords aren't the same, then it should echo "password doesn't
 match!". So when NOT the same, then echo. What to use for the NOT??
 should it then be something like this with the exlamationmark?
 
  if ($PASS !== $PASSNOG) {
 echo "password doesn't match! $back";
 exit;
 }
 
 
 Duky
 
 
 Duky wrote:
  
   Can somebody tell me what the proper statement is for this? I want two
   variables to match with eachother but this doesn't seems to work. Help
   please? THNX
  
  if ($PASS != $PASSNOG) {
 echo "password doesn't match! $back";
 exit;
 }
  
   Duky
  
   --
   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]
 
 --
 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]

 --
 http://www.mossroot.com/index.php
 AIM Handle: Buffalo2K
 e-mail: [EMAIL PROTECTED]
 "When you lose the power to laugh at yourself, you lose the power to think
 straight."  --Clarence Darrow


 --
 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]




-- 
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] Javascript and PHP

2001-03-14 Thread Joe Brown

Well,
No and Yes.

If the form is posted, whichever page that it was posted too will have
$HTTP_POST_VARS["text1"]
set to whatever was in the textbox. $text1 may also be a global variable,
depending on your php.ini settings for register_globals and also
variable_order.

It took me a while to feel comfortable with the web client/server
conversation.  PHP has no way of chatting with a client after a page has
been sent.  During the page request process, if a post was submitted from
the client variables will be sent via $HTTP_GET_VARS, $HTTP_PUT_VARS and/or
$HTTP_POST_VARS depending on how the form is configured.



"vivekmisra" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Morning !!!   experts

 Sorry its lil bit  off list question  but u r the experts remember
!

 Is there nething in php  similar to javascript's following code ??:

 document.form1.text1.value  = ?

 so that i can fetch the value of any textbox into php variable [$var]

 thx in advance.

 Vivek
 --
--
 -D-AND GATE -|O--Complement ?
 --
--

 --
 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]




-- 
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] Connecting to Oracle

2001-03-13 Thread Joe Brown

I'm not looking forward to this...  Due to circumstances beyond my control,
I will be forced into a similar configuration soon.

Try putenv("ORACLE_SID=WKDS.world");
If your sqlnet.ora does does not specify .world as the default domain, then
that may be the problem.

Was your TNSNAMES.ORA file ftp'd from somewhere to where it is now?
  If so, did you use the ascii or text mode option?

HTH

"Herbert Groot Jebbink" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello,

 I have problems connecting with PHP to Oracle.

 - Operating system is Windows 95
 - Apache version is 1.3.14
 - The PHP version is 4.04pl1 (NuSphere 1.13.6)
 - The line "extension=php_oracle.dll" is active in php.ini
 - De Oracle Database version is 7.3.4.0.0
 - De SQL*NET client version is 2.3.4.0.0
 - Using the SQL PLUS 3.3.4.0.0 client on this machine works fine:
 - The ociw32.dll file is in the path of the webserver

 The test program is:

  ?php
   putenv('ORACLE_HOME=c:\orawin95');
   putenv("ORACLE_SID=WKDS");
   $conn = ora_logon("hgj@wkds", "hgj");
  ?

 The result is:

  Warning: Unable to connect to ORACLE (ORA-12154: TNS:could not resolve
  service name) in /www/data/ontwikkel/test/php/test3.php on line 4

 I have lookup the ORA-12154 error and it talks about the tnsnames.ora
 file, this file is located in c:\orawin95\network\admin\ and I have set
 ORACLE_HOME to c:\orawin95, so it must find that file, the part
 of the database in tnsnames.ora is below.

 wkds.world =
   (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS =
   (COMMUNITY = tcp.world)
   (PROTOCOL = TCP)
   (Host = rnwux1)
   (Port = 1521)
 )
 (ADDRESS =
   (COMMUNITY = tcp.world)
   (PROTOCOL = TCP)
   (Host = rnwux1)
   (Port = 1526)
 )
 )
 (CONNECT_DATA = (SID = WKDS)
 )
   )


 Greetings, Herbert

 --
 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]




-- 
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] Re: Connecting to Oracle

2001-03-13 Thread Joe Brown

Brian,

Thanks for the solution, that is a good one.

I imagine you can set the environment variable oracle_sid this way also.
ORACLE_SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.68.10.1)(PORT=1521)
)(CONNECT_DATA=(SID=TEST)))

re: TNSNAMES.ORA

It seems to be a fairly common occurence where a tnsnames.ora file is
transferred to a linux box from a dos box.  This transferrence sometimes
does not perform a text file conversion on the tnsnames.ora file.

That being the case, the lines are terminated with CRLF (carriage return
and line feed) characters.  Oracle on Linux does not like this.

If that is the case, when you use vi and examin the file, it should tell you
it is a dos file.
type ":set ff=unix" and ":x" to save and exit will convert the file.

The other thing to keep in mind is that the user "nobody" or whomever user
your webserver runs as, has permissions to the TNSNAMES.ORA file, including
all directories leading up to the TNSNAMES.ORA file.



""Brian.J.Mauter"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hey, I'm using Oracle with PHP.  I never could get the blasted thing to
 work right.  What I ended up doing was something similar to this:

 $db =
"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.68.10.1)(PORT=1521))(CONNECT_
DATA=(SID=TEST)))";
 $conn = OCILogon("scott", "tiger", $db);

 From what I can tell, this completely lets PHP ignore your tnsnames.ora
 file.  So if you're having some rather interesting trouble connecting with
 environment variables, give that a shot.  The only things you'll have to
 replace are the SID and the IP address.  :)

 -Brian


 --
 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]




-- 
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] Oracle Function Calls

2001-03-07 Thread Joe Brown

this chunk of code comes out of
http://www.php.net/manual/en/function.ocinewcursor.php

?php
// suppose your stored procedure info.output returns a ref cursor in :data

$conn = OCILogon("scott","tiger");
$curs = OCINewCursor($conn);
$stmt = OCIParse($conn,"begin info.output(:data); end;");

ocibindbyname($stmt,"data",$curs,-1,OCI_B_CURSOR);
ociexecute($stmt);
ociexecute($curs);

while (OCIFetchInto($curs,$data)) {
var_dump($data);
}

OCIFreeCursor($stmt);
OCIFreeStatement($curs);
OCILogoff($conn);
?

Hope that helps, I havn't gone there (yet).

""Richard S. Crawford"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ah!  My bad!  I sent this question out with the wrong subject line.  My
 apologies to everyone that I confused.


 At 01:07 PM 3/7/01 -0800, Richard S. Crawford wrote:


 I desperately need to know whether it is possible to call an Oracle
 function in PHP.  For example...
 
 $functionResult=hubins($name,$commit_yn)
 
 where hubins is a stored procedure in our Oracle database.
 
 Can this be done?  My first thought was to do something like this:
 
 $functionCall="hubins($name,$commit_yen)";
 
 then then do
 
 ociexecute($functionCall);
 
 ...but that, of course didn't work.
 
 Any thoughts?
 
 
 --
 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]
 

 --
 http://www.mossroot.com/index.php
 AIM Handle: Buffalo2K
 e-mail: [EMAIL PROTECTED]
 "When you lose the power to laugh at yourself, you lose the power to think
 straight."  --Clarence Darrow


 --
 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]




-- 
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] php 3 vs. 4

2001-03-02 Thread Joe Brown

Nope, session management was added in php4.

The phplib project among other things, provides a session management
mechanisim.

""Free Beachler"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 is there any support for session mgmt in php3?

 my client is trying to run an application bhilt in php 4
 on a php 3 host.  they're getting this error:::

   Warning: open(/tmp\sess_f457a8d6cff21b32a0556e8a4fe9ff85, O_RDWR)
failed:
 m (2) in Unknown on line 0

   Warning: Failed to write session data (files). Please verify that the
 current setting of session.save_path is correct (/tmp) in Unknown on line
0


 is it because it's on a php3 host?

 -free


 --
 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]




-- 
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]




[PHP-DB] Javascript diabled? (was Re: [PHP-DB] onMouseOver onMouseOut)

2001-03-02 Thread Joe Brown

Curious.  I disabled javascript in IE 5.5

Out of the limited scripting I use on my site, the navigate to first entry
field nolonger works, but the onchange() event seems to be firing still...

Go figure.

"Ron Brogden" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 At 06:27 PM 2/23/2001 -0300, you wrote:
 Remember, php is server side while JavaScript is client side. You can't
use
 php client side. You can use some client side events to call php scripts
 which will run on the server and send data to the browser. Events are
client
 side, so try JavaScript you'll enjoy it too.

 Also keep in mind that Javascript should *never* be relied upon for input
 validation.

 It is trivial to disable Javascript on the client side (and there are very
 good reasons for doing so, drop by www.securityfocus.com sometime for
 reasons why) and you cannot trust any data that comes from the end user.
I
 personally would never recommend Javascript "crippling" your site - it
 should run perfectly without it since support varies from browser to
 browser (not everyone uses the latest version of IE) and you have no
 guarantee that it will be enabled client side at all. That's not even
 getting into people building URLs by hand for "kicks". Since you have to
 perform input validation server side anyway, this makes Javascript pretty
 much useless for this purpose.

 Javascript is really only useful for display effects that do not affect
 accessibility which means they should be avoided most of the time just
like
 Macromedia Flash, Quicktime, etc. unless you are 100% sure your audience
 meets your site's requirements exactly.

 All IMHO of course.

 Cheers,

 Ron


 --
---
 Island Net AMT Solutions Group Inc.  Telephone:  250
383-0096
 1412 Quadra  Toll Free:1 800
331-3055
 Victoria, B.C.   Fax:250
383-6698
 V8W 2L1  E-Mail:
[EMAIL PROTECTED]
 Canada   WWW:
http://www.islandnet.com/
 --
---


 --
 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]




-- 
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] md5

2001-02-27 Thread Joe Brown

You are aware that md5() generates a 32 byte character string?

Working on the 10 digit password request, have you alotted enough space in
your database columns to cater to a 32 byte string (64 for multibyte)?

BTW: md5 has eaten everything I've thrown at it ;-)

""bryan"" [EMAIL PROTECTED] wrote in message
005801c0a0f1$c5c3cd40$272478cc@bryan">news:005801c0a0f1$c5c3cd40$272478cc@bryan...
I need some advice on this
I am creating a random password through a function.

This creates a random password and updates it in the database.
The sql query works if I make it :

$sql = "UPDATE members SET password='$password', verify='$verify' WHERE
username='$username' ";

but if I make the code (as below) with the md5, it does not.
I must be doing something wrong, or it does not like to md5 random things
or something.  Any Advice?

  for ( $a=0; $a1; $a++)  {

  $password = newpwd( 10 );
  $verify = $password;

  $dbcnx = mysql_connect('localhost', 'bryan', 'fitch');
  mysql_select_db( "playtime" );

  $sql = "UPDATE members SET password=' ".md5($password)." ', verify='
".md5($verify)" ' WHERE username='$username' ";


Thanks

bryan

Bryan Fitch
Programmer
Concept Factory
[EMAIL PROTECTED]
http://www.concept-factory.com






-- 
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] Resolution detect and redirect

2001-02-27 Thread Joe Brown

This feat will require a java script (not appropriate for php/db).

I saw something on a javascript site, perhaps www.webreference.com

gl

""Matthew Cothier"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Why not just create a table that will resize to any resolution?

 Because I am using different sized images for the different resolutions as
 well as other page thingys.

 And I need the script for other things too.

 So can anyone help?
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


 --
 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]




-- 
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] MySQL join problem

2001-02-27 Thread Joe Brown

I doubt that a few thousand records would be more than mysql is capable of
handeling.
However my ignorance of Mysql is abundant.

Does it use the /tmp directory and is your /tmp or root partition small?
(guessing linux here).

Does mysql use the /tmp directory for temporary tables?
(Answer in ReadMe(s) probably)...

""Elliott Lee"" [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hi all,

 This may not necessarily be a PHP problem, but I was initially trying to
do
 this in PHP.  I was trying to do a join of two tables and I get a response
 from MySQL saying that some SQL temp file was out of space.  One of my
 tables has a few thousand items in it and my other table that I'm joining
 with is pretty small, maybe 15 items.  Is there a limitation to the size
of
 the query that I can do?  I'm not out of disk space either.

 Elliott

 --
 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]




-- 
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] Can't connect to local MySQL server error

2001-02-27 Thread Joe Brown

Heh, hate this gotcha...
The file permissions are good...  ok, now check each directory up to
mysql.loc
/var
/var/lib
/var/lib/mysql
Does the world have read and execute perms on all of the above (hehe made a
funny)?

Without read and execute perms on the parent directories, the world cannot
see the file to have read write and execute to the socket file.

gl
"Rick Emery" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 MySQL is running; I can execute MySQL as ROOT.  The
 /var/lib/mysql/mysql.sock file exists with read/write/execute permissions
to
 user/group/world.

 Any other ideas are appreciated.

 Thanks

 rick

 Richard L. Emery
 IT Sr. Project Manager

 "There is no 'trying'...
 There is only 'Do' or 'Not Do' "


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 26, 2001 4:46 PM
 To: Rick Emery; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Can't connect to local MySQL server error


 Addressed to: Rick Emery [EMAIL PROTECTED]
   '[EMAIL PROTECTED]'

 ** Reply to note from Rick Emery [EMAIL PROTECTED] Mon, 26 Feb 2001
 14:33:32 -0600
 
  I tried:  Grant ALL ON *.* to user@localhost IDENIFIED BY "password";
  so as to provide access to all tables.  I should have stated that the
 error
  I got was that I could not connect to the
  /var/lib/mysql/mysql.sock socket.

 Make sure that MySQL is running, that the mysql.sock file exitst, in the
 specified location, and that the permsiions on that file, and every
 directory above it allow the user the web server runs as has read
 and execute rights.  Note that execute for directories means that you
 can cd to it, and has nothing about running programs from within it.


 If the file is missing, try to find it  (locate)  and look in php.ini
 for a setting to specify the correct location for your system.

 Rick Widmer
 Internet Marketing Specialists
 http://www.developersdesk.com

 --
 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]




-- 
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] Oracle 8i questions

2001-02-26 Thread Joe Brown

":body" in sql isn't the same as ":bodytext" in the bindbyname statement,
after that, you're in deeper than myself...

HTH,
-Joe
""Chris Murtland"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I apologize for my cross-post, but since I received no response on the
 general list, I decided I must have posted in the wrong place.

 I am trying to update an Oracle 8i CLOB field. I have looked at previous
 messages on the list and am trying the following:

 $sql="update murtland.articles set

title='$title',release_date=TO_DATE('$release_date','-MM-DD'),body=:body
 text,sections='$sections',mod_date=TO_DATE('$mod_date','-mm-dd
 hh24:mi:ss'),mod_userid=$userid where articleid=$articleid";
 //echo $sql;
 $stmt=OCIParse($conn,$sql);
 $bodytext = OCINewDescriptor($conn, OCI_D_LOB);
 OCIBindByName($stmt,":bodytext",$bodytext,-1,OCI_B_CLOB);
 OCIExecute($stmt, OCI_DEFAULT);
 $bodytext-save($body);
 OCICommit($stmt);
 $bodytext-free();
 OCIFreeStatement($stmt);
 OCILogoff($conn);

 However, this gives me the error: invalid LOB locator specified.

 Also, does anyone have any example code for searching Oracle 8i CLOB
fields?
 Do I
 have to create a stored procedure to be able to do this?

 I want to be able to search a separate varchar column in addition to
 searching the CLOB column.

 Thanks in advance,
 Chris

 
 Chris Murtland
 Studio Moxie, LLC
 www.studiomoxie.com
 336.773.1684
 800.707.2367 fax/voicemail


 --
 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]




-- 
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] Fatal error: Call to undefined function: () in add2.php on line 11

2001-02-26 Thread Joe Brown

back to the drawing board...

Re-compile php --with-mysql

""jim and lois flaherty"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   help , I have this problem

I have redhat 7.0
mysql 3.23
and php-mysql rpm installed

  my code

  html
 head
titleFlaherty Family Page/title
 /head
 ?

 //  connect to server

 $mysql_link = mysql_connect("localhost", "user","password");

 $mysql_select_db("resume");

 $query = "insert into employer(name,add1,add2,city,state)";
 $query = $query."values('$name','$add1','$add2','$city','$state')";


 $mysql_result = mysql_query($query, $mysql_link);


 my line 11 is mysql_connect


 please let me know what I am doing wrong

 --
 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]




-- 
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] OCI 8 and rowid cause SIGSEGV

2001-02-24 Thread Joe Brown

The  the colon has special meaning.

Look up the OCI man page, specifically - look up the  OCIBindByName
function.
http://www.php.net/manual/en/ref.oci8.php

It may give you a hint for the use of the colon and it's use in positioning
bound variables.
--
Without knowing your table structure and how you are using rowid, I cannot
guess what are trying to do.

It is a good idea to avoid using rowid for updating records.  Instead, use a
primary key column containing a sequence generated value for record
identification.

Good luck,
-Joe
"Sven Voigt" [EMAIL PROTECTED] wrote in message
01022417435802.00314@photon">news:01022417435802.00314@photon...
On Friday 23 February 2001 17:03, you wrote:
 I suppose the authors never concieved a replacement parameter for select

 specification.

 try:
  $sql =3D "select foo, bar, rid from masterdata WHERE rid=3D:rid"

 You need to loose the colon ":" or place it to the right of a where cla
 use.

Sorry to bother this list again, but I don't get the point... :-(

I need the rowid for later updates by a user form. So how can I issue a
select clause with 'WHERE rid=3D:rid'? Don't I need this for the *update*
clause???

This is what I thought of:
1.) select foo, bar, rid from masterdata
2.) let user select data set to update with 'update.php?rowid=ROWID'
3.) write changes to database: update foo, bar values (FOO, BAR) where
rowid=ROWID'

And what's about that colon? Is there any special meaning in PHP?

I'd highly appreciate your help/answer! Many thanks in advance
--
Sven Voigt, Mainz, Germany
http://www.ps90.de

Tower: "Mission 123, do you have problems?"
Pilot: "I think, I have lost my compass."
Tower: "Judging the way you are flying, you lost the whole instrument
panel!"

--
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]




-- 
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] deleting carts

2001-02-24 Thread Joe Brown

Although it is probably easiest for you to manage this with php,
It makes more sense to me to write a script that is managed by cron (php if
you really want) that is executed on a regular basis w/out affecting any
users browser latency.

If each customer has to wait a little longer, you're going to have less
happy customers.

The latency should be trivial, but "should" usually means gottcha.

For whatever database your using, there should be a simple solution for
executing scripts which you could place in a cron job.  PHP should be
overkill.

However, if you insist on PHP, you can compile up the cgi module which
doesn't require a browser.  Others have suggested executing a php script
with lynx via cron.  Although...  Firing up lynx to talk to apache to
execute a php script, to issue a database command sounds like a lot of
overkill to me.

Especially when this is simpler to create and maintain:
$ mysql  --execute "delete from carts where timestamp  now() + 36000"

--
Have fun,
-Joe
""Jorge Santos"" [EMAIL PROTECTED] wrote in message
002e01c09ee4$f1754360$[EMAIL PROTECTED]">news:002e01c09ee4$f1754360$[EMAIL PROTECTED]...
 Hi Nick,

 Of course it's possible. Anything is possible. Simply generate a simple
PHP
 script that will be executed from the command line which is called from a
 cron. The PHP script would simple delete any records where (current
date) -
 (your date_added) = 90 days.

 On the other hand, on the shopping cart that I wrote, I did it another
way;
 instead of creating a separate script and additional external components
 (the cron for example), simple create 1 function that holds the
 functionality needed to delete the old records. Then just call the
function
 each time your cart script is called. There's no reason to create a cron
to
 delete records because you can have the shopping cart script do it
 automatically...


 Hope this helps,
 Jorge
 [EMAIL PROTECTED]
 - Original Message -
 From: Nicholas W. Miller [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, February 24, 2001 11:31 PM
 Subject: [PHP-DB] deleting carts


  I am developing a shopping cart style e-commerce web site.   I have a
  table called carts that holds users' cart items ... so one user may
  have several entries in this table:
 
  ++--+--+-+-+---+
  | Field  | Type | Null | Key | Default | Extra |
  ++--+--+-+-+---+
  | cust_id| int(11)  |  | | 0   |   |
  | item_id| int(11)  | YES  | | NULL|   |
  | qty| tinyint(4)   | YES  | | NULL|   |
  | price  | float(10,2)  | YES  | | NULL|   |
  | date_added | timestamp(6) | YES  | | NULL|   |
  ++--+--+-+-+---+
 
  I would like to write a PHP script that I will cron which will delete
  all items belonging to a user if their most recent item is over 90
  days old.
 
  Is this possible?
 
  Nick
 
  --
  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]
 


 --
 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]




-- 
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] Server side or client side?

2001-02-24 Thread Joe Brown

Don't complicate it...

Just enclose your list entries in a
href=another.html?id=${entry}${entry}/a and use another page if you
want...
Or loop back to the same page and check
if(empty($id))
 {show the first list... a href=${PHP_SELF}?id=${entry}${entry}/a ...}
else
 { show the second list}


""Sridhar Ranganathan"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi

 I have a list that is populated by a table. when an item is selected, i
want
 to show another list populated from antoehr table WITHOUT form submission.
 possible?? i think this kinda mixes client side and server side does it
 now?!

 regards
 sridhar ranganathan

 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


 --
 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]




-- 
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] OCI 8 and rowid cause SIGSEGV

2001-02-23 Thread Joe Brown

I suppose the authors never concieved a replacement parameter for select
specification.

try:
 $sql = "select foo, bar, rid from masterdata WHERE rid=:rid"

You need to loose the colon ":" or place it to the right of a where clause.

[EMAIL PROTECTED] wrote in message
F114C0EF28F3D211B7E84000610104461D3D44@XNT-FRALIC-9">news:F114C0EF28F3D211B7E84000610104461D3D44@XNT-FRALIC-9...
 Hi there!

 I am using the following code on SuSE 6.4, Apache 1.3.14 and PHP 4.0.4:
 # $sql is dyanmically built, e.g.

 $sql = "select foo, bar, :rid from masterdata";

 $db = OCILogOn("picht","picht");

 $stmt = OCIParse($db, $sql);

 $rowid = OCINewDescriptor($db,OCI_D_ROWID);

 OCIBindByName($stmt,":rid",$rowid,-1,OCI_B_ROWID);

 OCIExecute($stmt);

 What's wrong? Am I missing something or is this a bug? Often a where
clause
 is used for selects, but that doesn't seem to be the problem. (Can I use
 "where $key like '$value'"? I read somewhere not to use quotes on DB
 selects). Finally, here's the output from gdb:

 Program received signal SIGSEGV, Segmentation fault.
 0x4067154f in memcpy () at ../sysdeps/generic/memcpy.c:64
 64  ../sysdeps/generic/memcpy.c: Datei oder Verzeichnis nicht
gefunden.
 [file not found...]
 (gdb) bt
 #0  0x4067154f in memcpy () at ../sysdeps/generic/memcpy.c:64
 #1  0x403f3dce in ttcclr () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #2  0x403e1d0c in ttcrd2r () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #3  0x403f58e8 in ttcacs () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #4  0x403e670b in ttcdrv () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #5  0x40315e45 in nioqwa () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #6  0x40241eaa in upirtrc () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #7  0x40221571 in kpurcsc () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #8  0x40276235 in kpuexecv8 () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #9  0x4027798c in kpuexec () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #10 0x4022e4a4 in OCIStmtExecute () from
 /zwei/oracle/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0
 #11 0x80822ed in oci_execute (statement=0x821f4ec, func=0x815cb10
 "OCIExecute", mode=32) at oci8.c:1182
 #12 0x8085a67 in php_if_ociexecute (ht=1, return_value=0x821f634,
 this_ptr=0x0, return_value_used=0) at oci8.c:3324
 #13 0x810c60f in execute (op_array=0x821a814) at ./zend_execute.c:1519
 #14 0x80e410b in zend_execute_scripts (type=8, file_count=3) at zend.c:729
 #15 0x807c56b in php_execute_script (primary_file=0xb518) at
main.c:1221
 #16 0x80f0bdb in apache_php_module_main (r=0x81fbacc,
display_source_mode=0)
 at sapi_apache.c:89
 #17 0x8079b36 in send_php ()
 #18 0x8079b76 in send_parsed_php ()
 #19 0x8117289 in ap_invoke_handler ()
 #20 0x812c4ff in process_request_internal ()
 #21 0x812c572 in ap_process_request ()
 #22 0x8123416 in child_main ()
 #23 0x81235d5 in make_child ()
 #24 0x8123756 in startup_children ()
 #25 0x8123dcd in standalone_main ()
 #26 0x81245fc in main ()
 #27 0x40632a5e in __libc_start_main () at
../sysdeps/generic/libc-start.c:93

 Cheerio, Sven


 --
 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]




-- 
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] ORA-12154: TNS:could not resolve service name in XXX

2001-02-22 Thread Joe Brown

I had a similar problem.

Worked up a tnsnames.ora file on windoz machines.  Thought it would be no
big deal if it was copied over to linux and used.  But there is a big deal..
Oracle can't handle the CRNL character sequence, in a unix environment.

Go figure...

There used to be a dos2unix program lying around my linux box.  A couple of
distributions later, I find none..

vi works well though..

$ vi tnsnames.ora
:set ff=unix
:w!

Did the trick for me, HTH.
-Joe

""Peter J. Krawetzky"" [EMAIL PROTECTED] wrote in message
001801c09cce$8c530160$[EMAIL PROTECTED]">news:001801c09cce$8c530160$[EMAIL PROTECTED]...
 I appears that PHP does not know about the paths for Oracle.  I am only
 guessing at this because I haven't installed Oracle on a Linux/Apache box
 but I think Apache is not aware of the Oracle paths that are required.
You
 might need to recompile Apache with the appropriate configuration
 parameters.
 -Original Message-
 From: Vlad [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Thursday, February 22, 2001 7:40 AM
 Subject: Re: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX


 Hi All
 Oracle is installed on SCO UnixWare
 Client that I use to connect on Windows 98
 env variables ORACLE_HOME, TNS_ADMIN for client is correctly defined
 by the way I created ODBC source for my ORACLE connection and tested it.
 Then I tryed to connect using PHP's odbc_connect and have the same
 problem...
 Is there any solution?
 Thanks, Vlad
 
  Make sure your tnsnames.ora file is setup correctly and that your
  environment variables are setup correctly.
 
  What OS are you using on the machine that Oracle is installed on?
 
  Peter J. Krawetzky
  -Original Message-
  From: Vlad [EMAIL PROTECTED]
  To: [EMAIL PROTECTED] [EMAIL PROTECTED]
  Date: Thursday, February 22, 2001 3:25 AM
  Subject: [PHP-DB] ORA-12154: TNS:could not resolve service name in XXX

 
 
  Hello All
  I have some problems connecting ORACLe from my php script.
  connection string:
$conn = OCILogon("asu", "asu", "asu");
  failed with
ORA-12154: TNS:could not resolve service name in XXX
  
  Regards, Vlad
  e-mail: [EMAIL PROTECTED]
  IóQ: 1042225964
  
  
  
  --
  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]
  
  
 
 
  --
  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]
 
 
 
 
 --
 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]
 
 


 --
 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]




-- 
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] problems with require...

2001-02-15 Thread Joe Brown

Try using the full path to your include or require file...  see if that
works.

inlude("D:\Inetpub\paulberry\press.inc");

The include_path is a list of directories where php should expect to find
files.  Yours appears to be empty.  Edit your php.ini to change this.

I don't remember if the current directory is implicitly included or not...
If you only include files in the same directory as the rest of your working
files (where your main.php file is) you could set include_path="." ( just
the period).

You might want to create a d:\inetpub\php\include directory and add it to
the path for includes you use in all projects.  Then you might set your
include_path="d:\inetpub\php\incude;."

Best wishes,

-joe "shmengie"

- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: php.db
Sent: Tuesday, February 13, 2001 7:30 PM
Subject: [PHP-DB] problems with require...


 Hi everyone;

 I have only started to program in php over the past month or so.
 but I'm some problems with this bit of code below.

 error message is:

 Fatal error: failed opening required "press.inc" (include_path=") in
 D:\Inetpub\paulberry\main.php on line 201

 I'm passing the values of main.php?pageid=1
 If I manually place press.inc it works OK..

 Does anyone know can you place variables in the require statement ??


?php
 // create connection
 $connection = mysql_connect("localhost","","") or
 die("Couldn't make connection.");
 // select database
 $db = mysql_select_db("paulberrydb", $connection) or die("Couldn't
 select database.");
 // create SQL statement
 $sql = "select id, title, includefile from pages where id=$pageid";
 // execute SQL query and get result
 $sql_result = mysql_query($sql,$connection) or die("Couldn't execute
 query.");
 // start results formatting
 // format results by row
 while ($row = mysql_fetch_array($sql_result)) {
 $title = $row["title"];
 $includefile = $row["includefile"];
 echo "p class='title'$title/p";
 echo "/TD";
 echo "/TR";
 echo "TR";
 echo "TD height=75 align='left' valign='top'";
 echo "P";

 **
 Problem area

 require('$includefile.inc');

 ***

 I also tried this..

 $includef = "'$includefile";
 $includef .=".inc'";
 require($includef);

 ***


 echo "/TD";
 echo "/TR/TBODY/TABLE";
 }
 // free resources and close connection
 mysql_free_result($sql_result);
 mysql_close($connection);
 ?


 ~
 David Irwin
 DWI Web Design
 E-Mail: [EMAIL PROTECTED]
 Http: www.dwiwebdesign.co.uk
 Tel: 028 38891537
 Mobile: 07968483610
 ~



-- 
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]