[PHP-DB] recommendation needed for dedicated server hosting

2002-12-18 Thread Taek Kwon
Hi,
I recently went through a horrendous experience with two different hosting
providers.  I'd like some recommendations on excellent hosting providers if
anybody has some.

My key priorities in order are:
1) around-the-clock, technically competent TELEPHONE support (webchat
support, message boards, email based support etc. will not do!)
2) reasonable hosting fees (no more than 300/month) for a dedicated server
3) services for the following - backup, OS upgrades/patching, security

If anybody has been with a company that they're happy with for at least a
year please leave some feedback.  Thanks!



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




[PHP-DB] picture into mysql (file address)

2002-12-18 Thread Seabird
Hi everyone, I have been struggeling with this for some time know and don't
know where it goes wrong. I want to upload pictures into a folder AND store
their path into MySQL. I used a joe's auto tutorial but can't get it to
work. All the information is put in correctly but not the picture.

Please help me, here's my code: (ps globals are off)

if ($_POST[submit]) {

$link = mysql_pconnect("localhost","myusername","mypassword");
$db = test;
mysql_select_db($db,$link);

$query = "INSERT INTO inventory
(registration,type,total_time,price,description,picture_name)
VALUES
('$_POST[registration]','$_POST[type]','$_POST[total_time]','$_POST[price]',
'$_POST[description]','$_POST[picture]')";

exec("cp $_POST[picture]
//localhost/seabird.jmtech.ca/OTF.com/images/$_POST[picture_name]");

mysql_query( $query, $link);
print 'Thank youYou have submitted the following information:';
echo "Registration: $_POST[registration]\n";
echo "Type: $_POST[type]\n";
echo "Total Time: $_POST[total_time]\n";
echo "Price: $_POST[price]\n";
echo "Description: $_POST[description]\n";
echo "temp file: $_POST[picture]\n";
echo "file name: $_POST[picture_name]\n";
echo "file size: $_POST[picture_size]\n";
echo "file type: $_POST[picture_type]\n";
echo "\n";
echo "\n";
}
else { ?>

  Registration


type


total time


price


Description


picture


  



--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching





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




[PHP-DB] Re: FW: Oracle connectivity question...

2002-12-18 Thread John 'zariok' Draughn
You'll need to verify that you have the tnsnames.ora file in 
$ORACLE_HOME/network/admin setup correctly.

Example: /opt/oracle/product/9.2.0/network/admin/tnsnames.ora

Some versions want 'SID' instead of 'SERVICE_NAME' in the 'CONNECT_DATA'

Example: 
DB1 =
  (DESCRIPTION =
(ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
  (SID = db1)
)
  )

Ensure the listener is running on the database server with:
  tnsping 

Example (good):
$ tnsping 10.1.9.2

TNS Ping Utility for Linux: Version 9.2.0.1.0 - Production on 18-DEC-2002 
16:42:34

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora

Used HOSTNAME adapter to resolve the alias
Attempting to contact 
(DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=10.1.9.2))(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.9.2)(PORT=1521)))
OK (130 msec)

Example (bad):
$ tnsping 10.1.9.1

TNS Ping Utility for Linux: Version 9.2.0.1.0 - Production on 18-DEC-2002 
16:43:14

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora

Used HOSTNAME adapter to resolve the alias
Attempting to contact 
(DESCRIPTION=(CONNECT_DATA=(SID=*)(SERVICE_NAME=10.1.9.1))(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.9.1)(PORT=1521)))
TNS-12541: TNS:no listener

John 'zariok' Draughn
Jabber: [EMAIL PROTECTED]


Scott V Nipp wrote:

> More information on the problem...  I tried including the SID in the
> OCILogon function and think that I may have gotten a bit further, but
> still
> not a successful logon.  Here is the error I am now receiving with the
> SID:
> 
> Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name
> in /www/DW/oratest.php on line 11
> Unable to logon to database.
> Thanks agian.
> 
>>  -Original Message-
>> From:NIPP, SCOTT V (SBCSI)
>> Sent:Wednesday, December 18, 2002 10:30 AM
>> To:  '[EMAIL PROTECTED]'
>> Subject: Oracle connectivity question...
>> 
>> OK.  I think I now have Oracle support built into PHP/Apache.  The
>> biggest hiccup for HP-UX seems to be that once you add Oracle support to
>> PHP, you CANNOT built PHP as a DSO, PHP MUST be compiled into Apache.
>> Once again, I think this is the case, I am still not completely sure at
>> this point.
>> 
>> I am now receiving an error on trying to connect to the Oracle
>> database that I do not understand, but leads me to believe that the PHP
>> Oracle support is functioning.  Here is the code I am attempting:
>> 
>> > $connection = OCILogon("userid", "password") or die ("Unable to logon to
>> database.");
>> # phpinfo();
>> ?>
>> 
>> Here is the error I am receiving:
>> 
>> Warning: OCISessionBegin: ORA-01034: ORACLE not available in
>> /www/DW/oratest.php on line 10
>> Unable to logon to database.
>> The code I am attempting is simply to verify successful connectivity
>> to the database.  I know that this doesn't really do anything, but I am
>> trying this simply to test for a successful connection.  Please let me
>> know if you have any ideas or suggestions.  Thanks again.
>> 
>> Scott Nipp
>> Phone:  (214) 858-1289
>> E-mail:  [EMAIL PROTECTED]
>> Web:  http:\\ldsa.sbcld.sbc.com
>> 
>>


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




Re: [PHP-DB] How can I use PHP to duplicate a mysql templatedatabase? [hack] bug

2002-12-18 Thread Paul Burney
on 12/17/02 6:20 PM, Daevid Vincent at [EMAIL PROTECTED] appended the
following bits to my mbox:

> This method copies the data, but doesn't copy 'Extra' stuff like
> "auto_increment".

I've used the following before:

SHOW CREATE TABLE $tablename

You could probably do something like this.

1) Pick the database (SHOW DATABASES);

2) Create new database

3) List the tables in the database (SHOW TABLES FROM $database)

4) For each table in the database, do the following:

a) SHOW CREATE TABLE $tablename
  
b) perform the above query on the new database

c) transfer the data

If the databases are on the same server, I think you can do (c) as the
following:

INSERT INTO $new_database.$tablename SELECT * FROM $old_database.$tablename;

If it's a remote server, I think it would require you to do it in PHP
(ouch).

Hope that helps.

Sincerely,

Paul Burney






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




RE: [PHP-DB] keyword search a mysql database.

2002-12-18 Thread John W. Holmes
FULL TEXT index?

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html
#Fulltext_Search

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -Original Message-
> From: mike karthauser [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 12:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] keyword search a mysql database.
> 
> I'm looking for tips and tricks in how to approach building a keyword
> search
> over an number of fields in a courses database.
> 
> I know how i can search for one word at a time, but i am not sure on
how i
> would approach searching via a defined string.
> 
> Anyone got any good pointers for doing this/ or some tutorial that i
can
> read though?
> 
> Thanks..
> 
> BTW kettles on if anyone wants a brew..
> --
> Mike Karthauser
> Managing Director - Brightstorm Ltd
> 
> Email   >> [EMAIL PROTECTED]
> Web >> http://www.brightstorm.co.uk
> Tel >> 0117 9426653 (office)
>07939 252144 (mobile)
> 
> Snailmail   >> Unit 8, 14 King Square,
>Bristol BS2 8JJ
> 
> 
> --
> 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




RE: [PHP-DB] random rows...what about tables

2002-12-18 Thread Matthew Moldvan
to get all the table names, then return a random table name, try the
following:



dont forget, when you use a mysql_query(), it returns a result set with more
than one value for each row returned. ie, $array[$i] could be anything from
the table name to its size to its whatever ...

Regards,
Matthew Moldvan

---
 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/ecommerce/
---

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 9:26 AM
To: 'Bruce Levick'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] random rows...what about tables


I think it's because mysql_list_tables returns a resource identifier
($result). You have to iterate through the resource identifier ($result)
with a while() loop to get the actual table names out. From the PHP.NET
site:



In the example above, I think the output would just be one table name.
However, you're going to have (and want) a list of multiple table names, if
I understand your problem correctly. In which case you'd have to put the
table names in an array called $tablenames so your array_rand($tablenames)
will work.

Haven't tested this out or done this specifically before, so I hope this
helps.
> -Original Message-
> From: Bruce Levick [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 9:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] random rows...what about tables
> 
> 
> Sorry,
> Have updated my script with a little help. Upon output i am 
> recieving this.
> 
> Warning: Argument to array_rand() has to be an array in
> C:\WORKING\portfolio\vivamotion\site\php\request.php on line 51
> 
> this is the code below.
> //
> //
> /
> 
>  //listing table in database
> $alltables = mysql_list_tables("portfolio");
> 
> //random array
>  $randomtable = array_rand($alltables);
> 
>  $all = mysql_query("SELECT * FROM Illustrations");
>  $totalRows_Recordset1 = mysql_num_rows($all);
>  $rndm = mysql_query("SELECT * FROM Illustrations ORDER BY 
> RAND() LIMIT
> 4,$totalRows_Recordset1");
>  if (!$rndm) {
>   echo("Error performing query: " .
>mysql_error() . "");
>   exit();
> }
> 
>  $randrow = mysql_fetch_array($rndm);
>  ?>
> 
> //output to browser
>  print "$randomtable\n";
> ?>
> 
> 
> Hope that helps
> 
> 
> 
> 
> - Original Message -
> From: "Jason Wong" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 17, 2002 11:48 PM
> Subject: Re: [PHP-DB] random rows...what about tables
> 
> 
> > On Tuesday 17 December 2002 21:38, Bruce Levick wrote:
> > > Bruce Levick - Vivamotion
> > > Been searching for an answer to selecting a random table 
> and then a
> random
> > > row within the selected table.
> > >
> > > I have this code which successfully selects a random row 
> within a hard
> > > coded table. But just can't get the random table working.
> >
> > [snip]
> >
> > > Anybody see the solution??
> >
> > First we need to know _what_ the problem is. I think we can 
> assume your
> code
> > doesn't work the way you expected. Can you tell us _how_ it 
> doesn't work?
> > Error messages?
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications 
> Development *
> >
> >
> > /*
> > We place two copies of PEOPLE magazine in a DARK, HUMID mobile home.
> > 45 minutes later CYNDI LAUPER emerges wearing a BIRD CAGE 
> on her head!
> > */
> >
> >
> > --
> > 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 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


RE: [PHP-DB] pictures into MySQL

2002-12-18 Thread Matthew Moldvan
I'm not completely sure of the implementation details, but look into the
BLOB data type.  

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#BLO
B

 Regards,
 Matthew Moldvan

---

 System Administrator
 Trilogy International, Inc
 http://www.trilogyintl.com/

---

-Original Message-
From: Seabird [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] pictures into MySQL


Hi everyone,

I know that inserting actual pictures into a MySQL DB is not the best
solution, but since I know the size is going to be limited I want to do it
anyways. How do I upload a picture into a DB? (what type of table etc.).

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching





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


Re: [PHP-DB] keyword search a mysql database.

2002-12-18 Thread Adam Voigt




$searchstring = $_POST[searchfor];

$searchstring = str_replace(" ","%",$searchstring);



mssql_query("SELECT id FROM table WHERE field LIKE '$searchstring';");



This will give you a looser search where all search terms have

to be there, but not necessarily next to each other, if you want a "phrase search"

so they have to follow each other:



$searchstring = "%" . $_POST[searchfor] . "%";



mssql_query("SELECT id FROM table WHERE field LIKE '$searchstring';");



Make sense?



On Wed, 2002-12-18 at 12:44, mike karthauser wrote:

I'm looking for tips and tricks in how to approach building a keyword search

over an number of fields in a courses database.



I know how i can search for one word at a time, but i am not sure on how i

would approach searching via a defined string.



Anyone got any good pointers for doing this/ or some tutorial that i can

read though?



Thanks..



BTW kettles on if anyone wants a brew..

-- 

Mike Karthauser 

Managing Director - Brightstorm Ltd



Email   >> [EMAIL PROTECTED]

Web >> http://www.brightstorm.co.uk

Tel >> 0117 9426653 (office)

   07939 252144 (mobile)



Snailmail   >> Unit 8, 14 King Square,

   Bristol BS2 8JJ





-- 

PHP Database Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP-DB] keyword search a mysql database.

2002-12-18 Thread mike karthauser
I'm looking for tips and tricks in how to approach building a keyword search
over an number of fields in a courses database.

I know how i can search for one word at a time, but i am not sure on how i
would approach searching via a defined string.

Anyone got any good pointers for doing this/ or some tutorial that i can
read though?

Thanks..

BTW kettles on if anyone wants a brew..
-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email   >> [EMAIL PROTECTED]
Web >> http://www.brightstorm.co.uk
Tel >> 0117 9426653 (office)
   07939 252144 (mobile)

Snailmail   >> Unit 8, 14 King Square,
   Bristol BS2 8JJ


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




Re: [PHP-DB] Now not selecting enough

2002-12-18 Thread Alex Francis
That was quick - Works alright now thank you
"Jason Selph" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try putting this:
> echo ("$meetingdate");
>
> in your while loop.  Right now it is just popping out the last record.
>
> Cheers
> Jason
>
>
> -Original Message-
> From: Alex Francis [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 11:00 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Now not selecting enough
>
>
> I am using the following script which I have used with minor variations,
> several times before without any trouble. I have 3 items in my database
but
> the script only returns 1. I can change which one by leaving off the order
> by filter, but can't get all three. Where am I going wrong. (PHP and
MySQL).
> $SQL = 'SELECT id, DATE_FORMAT(meetingdate, "%D %M %Y")as mtgdate FROM
> boardprevious order by meetingdate desc ';
>
> // execute SQL statement
> $ret = mysql_db_query($dbname,$SQL,$link);
>
> if (!$ret) { echo( mysql_error()); }
> else {
>
> // retrieve values
>
> while ($row = mysql_fetch_array($ret)) {
> $meetingdate = $row[mtgdate];
> $id = $row[id];
> }
> }
> echo ("$meetingdate");
>
>
>
>
> --
> 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




RE: [PHP-DB] FW: Oracle connectivity question...

2002-12-18 Thread Ryan Jameson (USA)
Yeah, on the server you should be able to type tnsping and your tnsname to make sure 
it is configured correctly.

<>< Ryan

-Original Message-
From: Andrey Hristov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 10:05 AM
To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] FW: Oracle connectivity question...


  Hey,

A friend of mine told me that :
kalo 19:02: trjanbva ti

tnsping vdb.masq

kalo 19:02: uf.. ne znam kak ce nastrojva tnslistaner-a..;(

kalo 19:03: ima si programa s kojato se pipat nastraojkite na TNSListener-a

kalo 19:03: ina4e ne mozesh ada se zaka4ish..


Translared to english :
19:02 You need
tnsping the_machine
19:03 : uff, I don't know how to setup the tnslistener
19:03 : there is a program to change the setting of TNSListener
19:03 : otherwise you can't connect


If this helps you :))

Andrey

- Original Mesage -
From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 6:51 PM
Subject: [PHP-DB] FW: Oracle connectivity question...


> More information on the problem...  I tried including the SID in the
> OCILogon function and think that I may have gotten a bit further, but
still
> not a successful logon.  Here is the error I am now receiving with the
SID:
>
> Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name
in
> /www/DW/oratest.php on line 11
> Unable to logon to database.
> Thanks agian.
>
> >  -Original Message-
> > From: NIPP, SCOTT V (SBCSI)
> > Sent: Wednesday, December 18, 2002 10:30 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Oracle connectivity question...
> >
> > OK.  I think I now have Oracle support built into PHP/Apache.  The
> > biggest hiccup for HP-UX seems to be that once you add Oracle support to
> > PHP, you CANNOT built PHP as a DSO, PHP MUST be compiled into Apache.
> > Once again, I think this is the case, I am still not completely sure at
> > this point.
> >
> > I am now receiving an error on trying to connect to the Oracle
> > database that I do not understand, but leads me to believe that the PHP
> > Oracle support is functioning.  Here is the code I am attempting:
> >
> >  > $connection = OCILogon("userid", "password") or die ("Unable to logon to
> > database.");
> > # phpinfo();
> > ?>
> >
> > Here is the error I am receiving:
> >
> > Warning: OCISessionBegin: ORA-01034: ORACLE not available in
> > /www/DW/oratest.php on line 10
> > Unable to logon to database.
> > The code I am attempting is simply to verify successful connectivity
> > to the database.  I know that this doesn't really do anything, but I am
> > trying this simply to test for a successful connection.  Please let me
> > know if you have any ideas or suggestions.  Thanks again.
> >
> > Scott Nipp
> > Phone:  (214) 858-1289
> > E-mail:  [EMAIL PROTECTED]
> > Web:  http:\\ldsa.sbcld.sbc.com
> >
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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


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




Re: [PHP-DB] FW: Oracle connectivity question...

2002-12-18 Thread Andrey Hristov
  Hey,

A friend of mine told me that :
kalo 19:02: trjanbva ti

tnsping vdb.masq

kalo 19:02: uf.. ne znam kak ce nastrojva tnslistaner-a..;(

kalo 19:03: ima si programa s kojato se pipat nastraojkite na TNSListener-a

kalo 19:03: ina4e ne mozesh ada se zaka4ish..


Translared to english :
19:02 You need
tnsping the_machine
19:03 : uff, I don't know how to setup the tnslistener
19:03 : there is a program to change the setting of TNSListener
19:03 : otherwise you can't connect


If this helps you :))

Andrey

- Original Mesage -
From: "NIPP, SCOTT V (SBCSI)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 18, 2002 6:51 PM
Subject: [PHP-DB] FW: Oracle connectivity question...


> More information on the problem...  I tried including the SID in the
> OCILogon function and think that I may have gotten a bit further, but
still
> not a successful logon.  Here is the error I am now receiving with the
SID:
>
> Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name
in
> /www/DW/oratest.php on line 11
> Unable to logon to database.
> Thanks agian.
>
> >  -Original Message-
> > From: NIPP, SCOTT V (SBCSI)
> > Sent: Wednesday, December 18, 2002 10:30 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Oracle connectivity question...
> >
> > OK.  I think I now have Oracle support built into PHP/Apache.  The
> > biggest hiccup for HP-UX seems to be that once you add Oracle support to
> > PHP, you CANNOT built PHP as a DSO, PHP MUST be compiled into Apache.
> > Once again, I think this is the case, I am still not completely sure at
> > this point.
> >
> > I am now receiving an error on trying to connect to the Oracle
> > database that I do not understand, but leads me to believe that the PHP
> > Oracle support is functioning.  Here is the code I am attempting:
> >
> >  > $connection = OCILogon("userid", "password") or die ("Unable to logon to
> > database.");
> > # phpinfo();
> > ?>
> >
> > Here is the error I am receiving:
> >
> > Warning: OCISessionBegin: ORA-01034: ORACLE not available in
> > /www/DW/oratest.php on line 10
> > Unable to logon to database.
> > The code I am attempting is simply to verify successful connectivity
> > to the database.  I know that this doesn't really do anything, but I am
> > trying this simply to test for a successful connection.  Please let me
> > know if you have any ideas or suggestions.  Thanks again.
> >
> > Scott Nipp
> > Phone:  (214) 858-1289
> > E-mail:  [EMAIL PROTECTED]
> > Web:  http:\\ldsa.sbcld.sbc.com
> >
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP-DB] Now not selecting enough

2002-12-18 Thread SELPH,JASON (HP-Richardson,ex1)
Try putting this:
echo ("$meetingdate");

in your while loop.  Right now it is just popping out the last record.

Cheers
Jason


-Original Message-
From: Alex Francis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 11:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Now not selecting enough


I am using the following script which I have used with minor variations,
several times before without any trouble. I have 3 items in my database but
the script only returns 1. I can change which one by leaving off the order
by filter, but can't get all three. Where am I going wrong. (PHP and MySQL).
$SQL = 'SELECT id, DATE_FORMAT(meetingdate, "%D %M %Y")as mtgdate FROM
boardprevious order by meetingdate desc ';

// execute SQL statement
$ret = mysql_db_query($dbname,$SQL,$link);

if (!$ret) { echo( mysql_error()); }
else {

// retrieve values

while ($row = mysql_fetch_array($ret)) {
$meetingdate = $row[mtgdate];
$id = $row[id];
}
}
echo ("$meetingdate");




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




RE: [PHP-DB] Now not selecting enough

2002-12-18 Thread Ryan Jameson (USA)
Your echo needs to be in the while loop...
<>< Ryan

-Original Message-
From: Alex Francis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 10:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Now not selecting enough


I am using the following script which I have used with minor variations,
several times before without any trouble. I have 3 items in my database but
the script only returns 1. I can change which one by leaving off the order
by filter, but can't get all three. Where am I going wrong. (PHP and MySQL).
$SQL = 'SELECT id, DATE_FORMAT(meetingdate, "%D %M %Y")as mtgdate FROM
boardprevious order by meetingdate desc ';

// execute SQL statement
$ret = mysql_db_query($dbname,$SQL,$link);

if (!$ret) { echo( mysql_error()); }
else {

// retrieve values

while ($row = mysql_fetch_array($ret)) {
$meetingdate = $row[mtgdate];
$id = $row[id];
}
}
echo ("$meetingdate");




-- 
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] Now not selecting enough

2002-12-18 Thread Alex Francis
I am using the following script which I have used with minor variations,
several times before without any trouble. I have 3 items in my database but
the script only returns 1. I can change which one by leaving off the order
by filter, but can't get all three. Where am I going wrong. (PHP and MySQL).
$SQL = 'SELECT id, DATE_FORMAT(meetingdate, "%D %M %Y")as mtgdate FROM
boardprevious order by meetingdate desc ';

// execute SQL statement
$ret = mysql_db_query($dbname,$SQL,$link);

if (!$ret) { echo( mysql_error()); }
else {

// retrieve values

while ($row = mysql_fetch_array($ret)) {
$meetingdate = $row[mtgdate];
$id = $row[id];
}
}
echo ("$meetingdate");




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




[PHP-DB] FW: Oracle connectivity question...

2002-12-18 Thread NIPP, SCOTT V (SBCSI)
More information on the problem...  I tried including the SID in the
OCILogon function and think that I may have gotten a bit further, but still
not a successful logon.  Here is the error I am now receiving with the SID:

Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name in
/www/DW/oratest.php on line 11
Unable to logon to database.
Thanks agian.

>  -Original Message-
> From: NIPP, SCOTT V (SBCSI)  
> Sent: Wednesday, December 18, 2002 10:30 AM
> To:   '[EMAIL PROTECTED]'
> Subject:  Oracle connectivity question...
> 
>   OK.  I think I now have Oracle support built into PHP/Apache.  The
> biggest hiccup for HP-UX seems to be that once you add Oracle support to
> PHP, you CANNOT built PHP as a DSO, PHP MUST be compiled into Apache.
> Once again, I think this is the case, I am still not completely sure at
> this point.
> 
>   I am now receiving an error on trying to connect to the Oracle
> database that I do not understand, but leads me to believe that the PHP
> Oracle support is functioning.  Here is the code I am attempting:
> 
>  $connection = OCILogon("userid", "password") or die ("Unable to logon to
> database.");
> # phpinfo();
> ?>
> 
>   Here is the error I am receiving:
> 
> Warning: OCISessionBegin: ORA-01034: ORACLE not available in
> /www/DW/oratest.php on line 10
> Unable to logon to database.
>   The code I am attempting is simply to verify successful connectivity
> to the database.  I know that this doesn't really do anything, but I am
> trying this simply to test for a successful connection.  Please let me
> know if you have any ideas or suggestions.  Thanks again.
> 
> Scott Nipp
> Phone:  (214) 858-1289
> E-mail:  [EMAIL PROTECTED]
> Web:  http:\\ldsa.sbcld.sbc.com
> 
> 

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




[PHP-DB] Oracle connectivity question...

2002-12-18 Thread NIPP, SCOTT V (SBCSI)
OK.  I think I now have Oracle support built into PHP/Apache.  The
biggest hiccup for HP-UX seems to be that once you add Oracle support to
PHP, you CANNOT built PHP as a DSO, PHP MUST be compiled into Apache.  Once
again, I think this is the case, I am still not completely sure at this
point.

I am now receiving an error on trying to connect to the Oracle
database that I do not understand, but leads me to believe that the PHP
Oracle support is functioning.  Here is the code I am attempting:



Here is the error I am receiving:

Warning: OCISessionBegin: ORA-01034: ORACLE not available in
/www/DW/oratest.php on line 10
Unable to logon to database.
The code I am attempting is simply to verify successful connectivity
to the database.  I know that this doesn't really do anything, but I am
trying this simply to test for a successful connection.  Please let me know
if you have any ideas or suggestions.  Thanks again.

Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com



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




[PHP-DB] Help with connecting PHP/MySQL to MS Outlook

2002-12-18 Thread Chris Streeter
Does anyone know of a way to retrieve MS Outlook data via PHP? I am creating
an intrant for my company and want to grab data from the MS Oulook contact
list on the server to using in my PHP/MySQL intranet project.

Any help would be most appreciated.

Thank you!

Chris Streeter
Bethlehem, PA  USA



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




[PHP-DB] Re: problem with PHP+flash programming

2002-12-18 Thread Radovan Radic

"Hermanto Kurniawan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i have a problem with this flash actionscript :
> loadVariablesNum
> ("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHigh+"&R="+random(999), 0);
>
> when i run this script i got an error message like this :
> error opening URL
"file:///C|/path/GuestBook.php?NumLow=0&NumHigh=10&R=470"
>
> does anyone know what is the problem with this script?
>

Maybe you should do this
loadVariablesNum("http://localhost/GuestBook.php?...";)
or when open html doc with embedded flash , open it via http://file.html

HTH,
Radovan



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




RE: [PHP-DB] My question in precise reg PHP and relational tables.

2002-12-18 Thread SELPH,JASON (HP-Richardson,ex1)
Yes, you can do something like this:

// setup connection variables to access your database
$connection = mysql_connect(HOST, USER, PASS);

//select your database
mysql_select_db(DB);

//prep query to get all the categories
$sql = "SELECT * FROM category ORDER BY number ASC";

// prep your array
$sql_result = mysql_query($sql,$connection)
or die("Couldn't execute query.");

// load each value into an array and build the option block 
while ($row = mysql_fetch_array($sql_result)) {
$category_type = $row["category"];
$option_block .= "$category_type";
 }

then in your form, use this code for the select box:





This will give you a drop down list that is dynamicly generated each time
the page is viewed by the values in your category table.


Cheers
Jason

-Original Message-
From: Phanivas Vemuri [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 5:45 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] My question in precise reg PHP and relational
tables.


hi,
I have added my question , my main Aim at the end of this explanation.

I have two tables.

1.ProgramClips ( id, progSummary, category, videoFile)PRIMkey = id.
and each id may have 2 or three categories.

2.Category( number,category).
categories are :
Beef , diary, horticulture etc;

I am using PhpMyAdmin as the interface for the mySql Database.
The PhpMyAdmin uses a text filed to show the values of the category.

If there are two or more categories for example Beef and Diary then"Beef

| Diary" is shown in the text field.

Now I want to change that text field into a drop down list and enable 
multiple selection of the values. And if I want to update the category field

in program clips I will select one or more values in the drop down list and 
do some programming to put a pipe symbol in between the selected values ( in

order to make MySQL to understand and interpret).

::

My Question in Precise is
1. is there aby way in realation databases that the values that appear in 
the FORM are the values from the 'categories' table. If I add more 
categories then those values can be automatically added into the FORM from 
whcih I update the 'category' field in 'programClips' table.

_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


-- 
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] Connect Time with Interbase

2002-12-18 Thread Andreas Steibl
Is it possible to minimize the time which PHP needs to connect to the
Interbase server ?
The problem is that for every page which need the Database, it needs about
1-2 seconds for connecting to the interbase (i use allready pconnect)
But everytime the script ends, the connection is closed to the DB.

Thanxs in advance
Snoopy


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