[PHP-DB] MSSQL not working NT4/IIS4/MSSQL6.5

2001-01-17 Thread Robert


I installed IIS, MySQL and php on my Win 2000 machine, set the variables in php.ini.
 When i do a phpinfo(); it returns that MSSQL is active
I then installed php on the company NT Server with IIS and MSSQL.
 When I do a phpinfo(); MSSQL is nowhere to be seen
I copied my php.ini from the 2000 machine to the NT machine, restarted IISAdmin, still 
not there.

Why would it work on 2000 but not NT?
I set them both up the same way.

If I run the script from my local webpage trying to connect to the database on the NT 
Server I get
"unable to connect to database, blah,blah,blah...not a trusted user" which I know is a 
privledges problem, but the MSSQL command was sent.

If I run it from the NT webpage I get 
"Fatal error: Call to undefined function: mssql_connect()"
which is a PHP setup problem.

$db = mssql_connect("NTS1", "wwwguest", "guest");
if(!$db){echo("Unable to connect to database server.");exit();}
if(! @mssql_select_db("bruin")){echo("Unable to select 
database.");mssql_close();exit();}
Any and all suggestions would be appreciated

Thanks all






[PHP-DB] Help with loop

2001-01-25 Thread Robert

Why does this spit out the same part over and over until it times out?

I have 2 tables in the same database

1:  bruindba ---Parts database
  specific_p   Part Number
  manufactur  ---Manufacturer
  package   ---Package in
 
2: ecomm   ---Ecommerce database
 ID ---session ID random number generated when first part is entered
 part   ---Part number

What I am trying to do is store the part numbers with the session ID in ecomm and then 
pull all of them
out with descriptions from bruindba. 

//- Get parts for this session 
// Check ecomm DB for parts by session ID ---
while ($res = mysql_query("SELECT * FROM ecomm where ID ='$sid'",$db)){
  if(!$res){echo("error preforming query: " . mysql_error());exit();}   
//error trap
  $row=mysql_fetch_array($res);
  $pno=$row["part"];

  //-Get part info from bruindba  ---
  $result = mysql_query("SELECT * FROM bruindba where specific_p ='$pno'",$db);
  if(!$result){echo("error preforming query: " . mysql_error());exit();}  
//error trap
  $row=mysql_fetch_array($result);
  $spp=$row["specific_p"];
  $mfc=$row["manufactur"];
  $pkg=$row["package"];
  echo" $spp";
  echo" $pkg";
  echo" $mfc";
}


Thanks for any help you can provide   -Bob-
 



Re: [PHP-DB] Help with loop

2001-01-25 Thread Robert

Thanks a million, works great now.

- Original Message - 
From: "Mark Newnham" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 25, 2001 1:41 PM
Subject: RE: [PHP-DB] Help with loop


 $res = mysql_query("SELECT * FROM ecomm where ID ='$sid'",$db))
   if(!$res){echo("error preforming query: " . mysql_error());exit();}
 //error trap
 while(  $row=mysql_fetch_array($res)){
   $pno=$row["part"];
 
 
 #
 Mark Newnham
 Application Design Associates, Inc
 6021 S.Syracuse Way #302
 Englewood, CO 80111, USA
 
 http://www.adacorp.com
 #
 
 
 
  -Original Message-
  From: Robert [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 25, 2001 12:31 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Help with loop
  
  
  Why does this spit out the same part over and over until it times out?
  
  I have 2 tables in the same database
  
  1:  bruindba ---Parts database
specific_p   Part Number
manufactur  ---Manufacturer
package   ---Package in
   
  2: ecomm   ---Ecommerce database
   ID ---session ID random number generated 
  when first part is entered
   part   ---Part number
  
  What I am trying to do is store the part numbers with the 
  session ID in ecomm and then pull all of them
  out with descriptions from bruindba. 
  
  //- Get parts for this session 
  
  // Check ecomm DB for parts by session ID 
  ---
  while ($res = mysql_query("SELECT * FROM ecomm where ID 
  ='$sid'",$db)){
if(!$res){echo("error preforming query: " . 
  mysql_error());exit();}   //error trap
$row=mysql_fetch_array($res);
$pno=$row["part"];
  
//-Get part info from bruindba  
  ---
$result = mysql_query("SELECT * FROM bruindba where 
  specific_p ='$pno'",$db);
if(!$result){echo("error preforming query: " . 
  mysql_error());exit();}  //error trap
$row=mysql_fetch_array($result);
$spp=$row["specific_p"];
$mfc=$row["manufactur"];
$pkg=$row["package"];
echo" $spp";
echo" $pkg";
echo" $mfc";
  }
  
  
  Thanks for any help you can provide   -Bob-
   
  
 
 -- 
 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] insert into mysql

2001-01-25 Thread Robert

//--- Add part --
if($act=="ADD"){
$sql="INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp'),$db";
if(! @mysql_db_query("$sql")){echo("Unable to add part.");mysql_close($db);exit();}
}

Why does this not work?



Re: [PHP-DB] insert into mysql

2001-01-25 Thread Robert

They are both set as text
they store numbers and letters from this link ( it's my local development
machine )

http://tech2000/rfq.php?spp=MC68020RC12Epkg=PGAmfc=MOTact=ADDsid=583607b
a7b565b6d699da58d7c7fe9ab

- Original Message -
From: "Darryl Friesen" [EMAIL PROTECTED]
To: "Robert" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 25, 2001 2:26 PM
Subject: Re: [PHP-DB] insert into mysql




  It still didn't work.
  just says unable to add part

   $sql = "INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')";

 Another thought:  Are ID and part character data of some sort?  If not
(i.e.
 if ID is an int) then remove the single quotes.


 - Darryl

  --
   Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
   Education  Research Technology Services, http://gollum.usask.ca/
   Department of Computing Services,
   University of Saskatchewan
  --
   "Go not to the Elves for counsel, for they will say both no and yes"



 --
 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] insert into mysql

2001-01-25 Thread Robert

Warning: Supplied argument is not a valid MySQL-Link resource in 
c:\inetpub\wwwroot\rfq.php on line 16
Unable to add part

//--- Add part --
if($act=="ADD"){
$sql="INSERT INTO ecomm (ID,part) VALUES $sql.="('$sid','$spp')";
if(! mysql_db_query('bruininv','$sql','$db')){echo("Unable to add 
part.");mysql_close($db);exit();}
}




[PHP-DB] insert in mysql

2001-01-25 Thread Robert

ignore that last one :) 
I goofed...

Still not working right though

if($act=="ADD"){
$sql="INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')";
if(! mysql_query('$sql')){echo("Unable to add part.");mysql_close($db);exit();}
}

just gives me "Unable to add part"




[PHP-DB] insert in mysql

2001-01-25 Thread Robert

This link is passed to the shopping cart type script where I want to put the spp and 
the sid into the database.

http://tech2000/rfq.php?spp=MC68020RC12Tpkg=PGAmfc=MOTact=ADDsid=583607ba7b565b6d699da58d7c7fe9ab

script language='php'

//  Connect to Database ---
$db = mysql_pconnect("tech2000", "wwwguest", "guest");
if(!$db){echo("Unable to connect to database server. Call 815-987-2775");exit();}
if(! @mysql_select_db("bruininv")){echo("Unable to select database. Call 
815-987-2775");mysql_close($db);exit();}

//--- Add part --
if($act=="ADD"){
$sql="INSERT INTO ecomm (ID,part) VALUES ('$sid','$spp')";
if(! mysql_query('$sql')){echo("Unable to add part.");mysql_close($db);exit();}
}


//---Close DB---
mysql_close($db);
/script

returns "Unable to add part".



I can manually add parts using DBTools and: 

INSERT INTO ecomm (ID,part) VALUES ('583607ba7b565b6d699da58d7c7fe9ab','MC68020RC12T')

and the search for the parts now works...
Just have to be able to add the parts and remove them from the db

I'm using ConTEXT for a text editor, works great for php!  Get it at 
http://www.fixedsys.com/context/ !!!
and it's FREE!!!




[PHP-DB] newbie help required re oracle

2001-04-29 Thread Robert

Ok I have looked at the faq and cant find the answer, all I seem to find is
the question, everywhere and no help for stupid people like me.

I want to use my Oracle db from php and apache. I understand I have to
compile php4 with oracle selected as an option. I have failed to do this,
and need help. Does anyone know where to go to get a compiled version of
php4 with oracle, or can anyone point me to a location where i can get
simple step by step instructions of what to do?

please do not assume any knowledge of UNIX or C. I am a scriptor not a
programmer and I have no knowledge of either, I just want a database
connection! please help.

RPK



-- 
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] Insert select Blob field from MySQL

2006-04-14 Thread Robert
Does anyone have an example of how to insert and select a blob field in a 
MySQL 4.1 database ?

-- 
Thanks,
Robert L. Campbell
510 Rook Rd.,West Point, TX 78963
Office: 979-242-3083 

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



[PHP-DB] What is the most efficient way to store SELECT results

2007-10-08 Thread Robert
I want to store the results of a SELECT query in order to be able to 
page through those results and allow the user to select one, see it in 
more details and then return to the original list of results. What's the 
usual technique for doing this?


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



[PHP-DB] SAP R3

2001-03-23 Thread Robert Sedlacek

Hi

does anyone has Information about using a SAP R3 Database with PHP4?

thx Robert


-- 
C o d i t o , e r g o  s u m  !
I   code,   therefore   I   am!

-- 
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] Apache, PHP, MySQL

2001-04-27 Thread Robert Staph

I'm having a spot of trouble getting the php-mysql-4.0.1pl2-9.i386.rpm package to 
install.

Its a Redhat 7.0 installation with MySQL 3.23.36-1 installed.

I'm currently using MySQL with ICRADIUS0.17b so I know that MySQL is installed and 
working yet I get:

rpm -i php-mysql-4.0.1pl2-9.i386.rpm 

error: failed dependencies:
mysql is needed by php-mysql-4.0.1pl2-9
libmysqlclient.so.9 is needed by php-mysql-4.0.1pl2-9

How can I get the information I need to install this package manually?  I've looked 
all over the MySQL and PHP page with not even a mention of php-mysql (even a valid 
on-topic result from the search engines on both sites).

the php-mysql rpm is the same version as php installed on the machine.  

I was playing around with a box with 7.1 and the package 
(php-mysql-4.0.4pl1-9.i386.rpm) installed just fine on that machine.

Any ideas?

Robert Staph, W3RCS
The Center for Advanced Technologies





[PHP-DB] Performance of Stored Procedures ?

2001-05-14 Thread Robert Boehrs

Hi,

i've just made some simple test with oracle and stored procedures. I've used
a simple select-statement within the stored procedure and the same query for
a direct query within php.
The direct query was about 50% faster. Is that normal? Will the stored
procedures become faster with more complex queries?

Any comments welcome

Robert

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

2001-05-14 Thread Robert Staph

Anyone know how to get the connecting client's ip address using php?  I need
to log this information to a db for security reasons

Thanks

Robert Staph, W3RCS
The Center for Advanced Technologies


- Original Message -
From: Roel Mulder [EMAIL PROTECTED]
To: Mark McCray [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 4:51 PM
Subject: Re: [PHP-DB] Url link


 Hi Mark,
 Try this code for your delight:
 http://www.oreillynet.com/pub/a/php/2000/11/02/next_previous.html
 Regards,
 Roel Mulder

 At 16:02 14-05-2001 -0400, you wrote:
 Hey there,
 I'm trying to build NEXT/PREV buttons on my search page.
 The only way I know to do it so far is via an url.

  8  8  8  8

 Does anyone know how best to get rid of the \'s or a better way to do
 next/prev buttons?
 
 Thanks!!!
 
 Mark


 Mulder Technisch Advies
 Postbus 69
 NL-2740 AB  WADDINXVEEN
 tel. 0182-640184 fax. 0182-640185
 http://www.mta.nl


 --
 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] Error MSG -410 while executing a select with ifx_query on a informix database on linux

2001-05-22 Thread Robert Hennig

Hi!

We use a informix IDS2000 server  on a linux machine together with php 4.05
on Apache. As a test we wrote the following script:

?php
$conn_id = ifx_connect(unipps,informix,sqLOpen);
if (! $conn_id)
{
  echo connection failed;
}

$ergebnis = ifx_query(select ident_nr from personal, $conn_id);
if(! $ergebnis)
{
  echo selection failed;
}

ifx_htmltbl_result($ergebnis, border=\2\);
ifx_free_result($ergebnis);
echo $ergebnis;
echo $conn_id;
?

The connect seems to work, because we get a syntax error if we use a wrong
field-name in the select. We receive the following error when executing this
script:

Warning: Describe fails (E [SQLSTATE=37 000 SQLCODE=-410]) in
/v/u/robert/public_html/datenbank.php on line 8

(line 8 is the line $ergebnis = ifx_query(select ident_nr from personal,
$conn_id);)

What wents wrong?

Robert






-- 
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] Error MSG -410 while executing a select with ifx_query on a informix database on linux

2001-05-22 Thread Robert Hennig

Hi Paul,

thanks for your fast reply. Maybe you could help me again :-) We are working
a lot with informix, so we thought to know every Programm, but isql is
completely unknown. Is this a special programm?

We have executed this select with a sql-editor on the server also as with
dbaccess, on both it works.

Thanks

Robert

Paul Gardiner [EMAIL PROTECTED] schrieb im Newsbeitrag
001201c0e2ca$730d0c40$0200a8c0@PDG">news:001201c0e2ca$730d0c40$0200a8c0@PDG...
 Hi Robert,

 Your test code is correct although you could do with an
ifx_close($conn_id);
 at the end.

 Have you tried running isql(assuming you've got it) and just trying to run
 the query from there?

 Regards,
 - Paul -




-- 
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] Oracle password funtion?

2001-07-02 Thread Robert Boehrs

Hi,

i was wondering if there's a funktion within oracle for md5 encryption of a
string, like there is in mysql (password()).

Best Robert

-- 
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] Distributed Tables vs. fewer Monster Tables

2001-07-07 Thread Robert Klinkenberg

If I understand it correcty you now have N tables with a structure

  MessageID |  | 

and want to combine all those tables in one table with a structure like

  ForumID | MessageID |  | 

This should not be a problem for any real db when you have an index on
forumID 
and MessageID.

This said, I mostly work with either Oracle or MS-SQL so mysql can still
cause
problems. ( I always was a bit shy of using mysql as it didn't support a lot
of 
functions that IMOH should be in a real db, like transactions and Ref
integrity,
but that seems to have changed nowadays)

Robert Klinkenberg


 -Oorspronkelijk bericht-
 Van:  John S. Huggins [SMTP:[EMAIL PROTECTED]]
 Verzonden:Saturday, July 07, 2001 12:31 AM
 Aan:  [EMAIL PROTECTED]
 Onderwerp:[PHP-DB] Distributed Tables vs. fewer Monster Tables
 
 
 I am putting the finishing touches on a forum program which has a direct
 lineage (look and feel at least) to Matt Wright's WWWBoard perl script.
 Remember that?
 
 Today I have one table per forum.  The forums on my live test site are
 huge.
 
 http://www.astronomy.net/forums/
 
 I have long dreamed of combining all the messages into one big honking
 table in MySQL and parse accordingly.  I already know how to do this, but
 wonder the following:
 
 - Will MySQL lookup performance suffer... much?
 - Is this just not a good idea?
 - Will this make MySQL just flat out quit?
 
 I have heard the hype behind MySQL being able to handle incredible amounts
 of data with relative ease.  I hear that MySQL does a good job when you
 are doing mostly reads as is the case here.  So far, I have had absolutly
 no issues with MySQL and just love it.  Thus, I am automatically biased.
 
 So what say you non-biased folks about data management for a multi-topic
 forum where each forum has identical structure, but differ only in topic?
 
 Combine and simplify?
 
 or
 
 Divide and conquer?
 
 
 John
 
 

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

2001-07-13 Thread Robert Klinkenberg

MySQL supports transactions so you can submit multiple SQL statements
and commit them all at once.

example of statement (from www.mysql.com)

BEGIN; 
SELECT @A:=SUM(salary) FROM table1 WHERE type=1; 
UPDATE table2 SET summmary=@A WHERE type=1; 
COMMIT; 

Robert Klinkenberg



 -Oorspronkelijk bericht-
 Van:  andRie Is [SMTP:[EMAIL PROTECTED]]
 Verzonden:Friday, July 13, 2001 2:19 AM
 Aan:  [EMAIL PROTECTED]
 Onderwerp:[PHP-DB] data consistency
 
 Hello php-db,
 
   is PHP / Mysql could handle multiple access into table to keep data
   consistency ?
   
 
  ,,,   
 (@-@)   
 +==---o00(_)00o-==+
 
 It is better to be defeated on principle than to win on lies.
 --Arthur Calwell
 -- 
 Best regards,
  andRie 
 
 
 -- 
 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: Making a new row in HTML tables

2001-07-25 Thread Robert Klinkenberg

Or 5x6 and 1 over...

But if you want to minimise the number of blank fields, you could
determine a max number of columns (and a minimum number of colums) that
you want to display and calculate the number of blank fields for all
posibilities
combinations.
Choose the one that minimises the number of blank fields.

Robert Klinkenberg


 -Oorspronkelijk bericht-
 Van:  Ian Grant [SMTP:[EMAIL PROTECTED]]
 Verzonden:Wednesday, July 25, 2001 6:28 PM
 Aan:  [EMAIL PROTECTED]
 Onderwerp:[PHP-DB] Re: Making a new row in HTML tables
 
 Yeah, but if I had 31,
 I'd want 6x5 and then 1 over, or something
 

-- 
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] Application dev w/ PHP MySql

2001-07-30 Thread Robert Barish

Hello
I am having to learn php and mysql, at the sametime and with a time 
constraint.  So I am hoping I can have a lending hand from all the coding 
gurus out there.   Let my give you a little back ground.  I the owner of an 
ISP tech support outsourcing company and am trying to develop a call note 
system where the techs input to mysql notes on the call the teched and then 
have our clients (isps) use and authenicated site to do a search view the 
browser on a particuliar user's call note history.   At the present time I am 
working on the Insertion part of the php script.  I have created a data base 
in mysql and have been able to populate the data base.When the tech hits 
the submit button and the data is inserted into the customer table, with 
cust_key, tech_key, cust_fname, cust_lname, cust_username, cust_timestamp 
columns and into table issues with issue_key, issue_type, issue_entry, 
issue_date columns.  I have this part working great.  

There is one more table in need to populate when the tech submits a call note 
and this is labled cust_issue_association.  The cust_issue_association table 
has the following columns cust_key and issue_key.  This table is being use to 
tie in the tables for a search.   My problem is I have no idea on how to 
populate this table.   When a call note is submitted into the customer table 
the cust_key is auto_incremented and in the issues table the issue_key is 
auto incremented.   So the million dollar question that is  driving me crazy 
with is how do I get these two keys to be inserted into 
cust_issue_association table when the call note is submitted. I have 
attached what I have done so far (please excuse the readabiltiy and basicness 
of the code this is my first time doing this)   

I hope I have described this clearly enough.   Of course, I will give created 
in the code  and on the appropriate html page, where create is do for the 
people who help me.  

Thank you ahead of time for all your inputs. 

Bob


-- 
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] Anyone used Pearson Corilations in PHP

2001-08-13 Thread Robert Trembath

Good Afternoon Everyone,

I am a fellow PHP developer that has run into a project where I need to know if 
anyone has created anything like this.

I need to do Pearson Corilations on Data from MySQL to do a top 10 match that 
compares DNA numerical image data(grayscale(0-255) and creates an image based on 
that image data for each row of image data.

Anyone done this before? Anything similar? Any comment are appreciated.

Thanks,
Robert
-
---
Robert Trembath
[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] Re: delete user but keep the article

2001-08-15 Thread Robert Hennig

hi Rsalomo,

it seems you would have to do some more work. At the moment I see to
possible ways to fix this:

- Re-design your application so that the news articles don´t need a
corresponding entry in the users table. Find another way to link user and
entry.
- Do some code which is executed when deleting this user and which  edits
the tables so that the user entry is another one.

Robert
Rsalomo [EMAIL PROTECTED] schrieb im Newsbeitrag
039c01c1256b$93d54300$0700a8c0@tiger">news:039c01c1256b$93d54300$0700a8c0@tiger...
 hi,

 i have a news article database that input by users, for example
articlename:
 'abc', input by username: 'user_x'.

 i want to delete user_x, but keep article abc.
 how php/mysql display that there is article named 'abc', input by
'user_x',
 but there are no further information about that user (except maybe only
his
 firstname) because user_x no longer exists.

 how can i do this?

 thanks

 rudy.




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

2001-08-15 Thread Robert Klinkenberg

You could also do a select sum(counter) from 
or, if the db supports it, select avg(...) from ...
Saves you the trouble of counting.
Robert Klinkenberg

 Van:  Andre P. [SMTP:[EMAIL PROTECTED]]
 Verzonden:Wednesday, August 15, 2001 6:48 PM
 Aan:  [EMAIL PROTECTED]
 CC:   PHP-DB
 Onderwerp:Re: [PHP-DB] Averaging Numbers
 
 Maybe I am missing the complexity but I would just add them all up as 
 you retrieve them (or where you are printing them out) and then when you 
 finish the loop divide the total by the number of of number you are 
 averaging over have (i.e this would be 15 if you are taking 15 days).
 
 

-- 
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] Oracle 8 on Linux on Sparc

2001-08-21 Thread Robert Schultz

Ok... we have an Oracle Server running on a remote Sparc 220R system.

We then have an Ultra 5, which has a Sparc processor in it. We have RedHat
Linux running on the Ultra 5. So thats Linux on Sparc (not i386).

Is it possible to communicate with the remote oracle database using this set
up?

Oracle only distributes binaries of their clients. They support linux, but
only under Intel chips. They support Sparc chips, but only with Solaris.

I looked DEEPLY into IODBC. What a nightmare. When I finally even remotely
determined that it was possible for free, all the drivers to connect to an
oracle DB were, again, in binary format and not available as source (damn
money grubbing companies).

So it all comes down to... is it even possible?

I heard rumors that with very cleaver relinking the Oracle 8.0.5 client will
work under Linux on Sparc.

Of course this is all to be used through PHP4.0.6 on the ultra 5.

The reason we are running Linux on the Sparc instead of Solaris is beacuse
PHP has a known bug in with PHP under Solaris when using the UCD SNMP
package (http://www.php.net/bugs.php?id=12282)
For the project this box will be used to develop REQUIRES PHP with full SNMP
support, Linux was necessary.

Any ideas anyone?

--
Robert Schultz - [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 I UPDATE 2 tables with 1 SQL statement?

2001-08-29 Thread Robert Klinkenberg

This is not standard SQL so most databases won't support it.

Access is supposed to support this kind of updates, but then it won't work
on other db's

A better way to do this is to issue two separate inserts right after each
other within a transaction.
But this will also crash some databases as not all databases support
transactions, notably MySQL 
and Access. However oracle, db2, interbase,  do support this kind of
thing and this is the standard
way of handling multiple connected sql commands.

The simple way is to issue two separate inserts right after each other
without transactions but this might
lead to concurrency problems

Robert Klinkenberg








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

2001-08-30 Thread Robert Vukovic

Table was created with this

CREATE TABLE `descriptions` (
  `id_property` bigint(20) NOT NULL default '0',
  `short_desc` varchar(255) default NULL,
  `long_desc` text,
  KEY `id_property`(`id_property`),
  PRIMARY KEY (`id_property`),
  UNIQUE KEY `id_property_2`(`id_property`)
) TYPE=MyISAM COMMENT='';

and this is query:

$res1=mysql_query(SELECT
$tbl_virtual.thumb1,$tbl_descriptions.short_desc FROM
$tbl_virtual,$tbl_descriptions WHERE $tbl_virtual.id_property=$link and
$tbl_descriptions.id_property=$link)

virtual is another table with picture names.

This query work at my home but not on real site. What is a problem. ?


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

2001-08-30 Thread Robert Vukovic

 Table was created with this
 
 CREATE TABLE `descriptions` (
   `id_property` bigint(20) NOT NULL default '0',
   `short_desc` varchar(255) default NULL,
   `long_desc` text,
   KEY `id_property`(`id_property`),
   PRIMARY KEY (`id_property`),
   UNIQUE KEY `id_property_2`(`id_property`)
 ) TYPE=MyISAM COMMENT='';
 
 and this is query:
 
 $res1=mysql_query(SELECT 
 $tbl_virtual.thumb1,$tbl_descriptions.short_desc FROM 
 $tbl_virtual,$tbl_descriptions WHERE 
 $tbl_virtual.id_property=$link and
 $tbl_descriptions.id_property=$link)
 
 virtual is another table with picture names.
 
 This query work at my home but not on real site. What is a problem. ?
 

I forgot to say that PHP is 4.04 and I am using MySQL


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

2001-09-01 Thread Robert Vukovic

That is the strange thing, there are no error messages. I simply don't
get short_desc with 

list($image,$desc)=mysql_fetch_row($res1);

$desc is empty.

I will try your query.

 -Original Message-
 From: Dobromir Velev [mailto:[EMAIL PROTECTED]]
 Sent: petak 31. avgust 2001. 10:04
 To: Robert Vukovic; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] SQL problem
 
 
 Hi,
 Are there any error messages?
 Just a guess - may be this will work
 
 Select $tbl_virtual.thumb1,$tbl_descriptions.short_desc FROM
 $tbl_virtual left join $tbl_descriptions on 
 $tbl_virtual.id_property=$tbl_descriptions.id_property WHERE 
 $tbl_virtual.id_property=$link
 
 Dobromir Velev
 
 -Original Message-
 From: Robert Vukovic [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Friday, August 31, 2001 7:34 AM
 Subject: RE: [PHP-DB] SQL problem
 
 
  Table was created with this
 
  CREATE TABLE `descriptions` (
`id_property` bigint(20) NOT NULL default '0',
`short_desc` varchar(255) default NULL,
`long_desc` text,
KEY `id_property`(`id_property`),
PRIMARY KEY (`id_property`),
UNIQUE KEY `id_property_2`(`id_property`)
  ) TYPE=MyISAM COMMENT='';
 
  and this is query:
 
  $res1=mysql_query(SELECT
  $tbl_virtual.thumb1,$tbl_descriptions.short_desc FROM 
  $tbl_virtual,$tbl_descriptions WHERE 
 $tbl_virtual.id_property=$link
  and
  $tbl_descriptions.id_property=$link)
 
  virtual is another table with picture names.
 
  This query work at my home but not on real site. What is a
 problem. ?
 
 
  I forgot to say that PHP is 4.04 and I am using MySQL
 


-- 
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] Parsing of db results by PHP

2001-09-09 Thread Robert Gormley

Hi all,

I have a MySQL db which contains table test, field test... one of the 
entries is

? external($url, $text); ?

Where external() is a function i've written which outputs simple text.

I want to be able to put calls to this function into the database, and have 
them parsed on rendering... With the above example, the raw code is just 
spat to the browser, and doesn't hit the interpreter.

Any ideas?

Regards,

Robert
Robert Gormley
[EMAIL PROTECTED]
http://seabreeze.asn.au/


-- 
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] Parsing of db results by PHP

2001-09-10 Thread Robert Gormley

Hrm, yup... that does what I want... thanks :) It might be a little bit 
messy... because it'll most likely be embedded in text :) I'm making a 
weblog system for myself, so the full field might be blah blah blah ? ... 
? blah blah which will most likely get messy...

Ahh well...

Rob

At 11:52 PM 10/09/2001, Rick Emery wrote:
use this PHP function:  eval()

As quoted from the PHP manual: eval() evaluates the string given in
code_str as PHP code. Among other things, this can be useful for storing
code in a database text field for later execution

Further info is in the manual under the Miscellaneous Functions chapter
(XXXVIII).

-Original Message-
From: Robert Gormley [mailto:[EMAIL PROTECTED]]
Sent: Sunday, September 09, 2001 1:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Parsing of db results by PHP


Hi all,

I have a MySQL db which contains table test, field test... one of the
entries is

 ? external($url, $text); ?

Where external() is a function i've written which outputs simple text.

I want to be able to put calls to this function into the database, and have
them parsed on rendering... With the above example, the raw code is just
spat to the browser, and doesn't hit the interpreter.

Any ideas?

Regards,

Robert
Robert Gormley
[EMAIL PROTECTED]
http://seabreeze.asn.au/


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

Robert Gormley
[EMAIL PROTECTED]
http://seabreeze.asn.au/


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

2001-09-14 Thread Robert Lindgren

Hi!

In mySql you can do:

replace into tbl_name values(value_1, value_2)

does it work for Oracle aswell?

Can anybody provide me with a link to a GOOD Oracle syntax reference.
Oracle needs serious help with their documentation...:-(

Regards

/Robert


-- 
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] Persistent Links and Temporary Tables

2001-09-14 Thread Robert Gormley

Hi,

Is anyone able to briefly explain to me how the use of temporary tables by 
MySQL is affected by PHPs persistent connections?

 From my reading of MySQL temp tables are deleted when the current 
connection is closed, but that might not be for quite a long time with a 
persistent connection... also, how does this affect concurrency of temp 
table creation?

Robert
Robert Gormley
[EMAIL PROTECTED]
http://seabreeze.asn.au/


-- 
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] Problem with session function: URL Parameter

2001-09-26 Thread Robert Gruber

I would use the session functions with URL parameter but PHP can't transmit
the SID to the link-URL.

This methods work:

1.
?php
session_id();
session_name();
session_register(username);
session_write_close();
?
a href=admin/admin.phtml??=SID?next/a

Result: http://admin/admin.phtml?PHPSESSID=85e6077fd4ff6bdd738707335f283ef5

2.
?php
session_id();
session_name();
session_register(username);
session_write_close();
?
script language=JavaScript
 function Test()
 {
   window.location.href=admin/admin.phtml??=SID?;
 }
 /script

Result: http://admin/admin.phtml?PHPSESSID=85e6077fd4ff6bdd738707335f283ef5

And this doesn't work:

?php
session_id();
session_name();
session_register(username);
session_write_close();
echo(script
language=\JavaScript\window.location.href=\admin/admin.phtml??php=SID?
\;/script);
?

Result: http://admin/admin.phtml??=SID?

PHP doesn't display the correct SID.
Instead the string ?=SID? were displayed!

Thank you!!!
bye



-- 
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] Problem with session function: URL Parameter

2001-09-26 Thread Robert Gruber


Jason Wong [EMAIL PROTECTED] schrieb im Newsbeitrag
001401c1469c$7c788440$[EMAIL PROTECTED]">news:001401c1469c$7c788440$[EMAIL PROTECTED]...
 -Original Message-
 From: Robert Gruber [mailto:[EMAIL PROTECTED]]
 Sent: 26 September 2001 22:19
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Problem with session function: URL Parameter
 
 
 I would use the session functions with URL parameter but PHP can't
transmit
 the SID to the link-URL.
 
 And this doesn't work:
 
 ?php
 session_id();
 session_name();
 session_register(username);
 session_write_close();
 echo(script
 language=\JavaScript\window.location.href=\admin/admin.phtml??
 php=SID?
 \;/script);
 ?
 
 Result: http://admin/admin.phtml??=SID?
 
 PHP doesn't display the correct SID.
 Instead the string ?=SID? were displayed!
 
 Thank you!!!
 bye

 That's because you're using ? ? when  you're already inside a php block.

 Try:

  admin/admin.phtml?php=SID

 instead.

Thank you for your answer but it doesn't work

If have tried:

php=SID
=SID
?=SID?
?php=SID?
lt?=SID?gt
lt?php=SID?gt


 hth
 --
 Jason Wong
 Gremlins Associates
 www.gremlins.com.hk
 Tel: +852-2573-5033
 Fax: +852-2573-5851






-- 
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] Sorting a 2 dimension array

2001-10-05 Thread Robert Gormley

Is ksort() what you're looking for?

Sorts an array by key, maintaining key to data correlations.

Robert

At 05:31 PM 5/10/2001 +0930, John Clarke wrote:
I would like to sort a 2 dimensional array based on the value of one of the
keys of each element.

I have an array returned from a msql query which contains 10
records/elements and each record 5 fields/keys.
I would like to sort the records based on the value of a particular field in
each record.

Is this possible.? I have looked thru all the array functions but cannot
seem to find anything that allows me to do this.

I dont want to write a separate peice of code to compare all of these
elements and their values and then place them into a new array in the
correct order if there is a simpler way of achieving it.

Any comments would be greatly appreciated.

Regards,

John Clarke



--
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] TREE in a database

2001-10-29 Thread Robert Vukovic

Is there an easy way to implement tree structure in a database.
Something like file systems do for files.

Hints, links, anything.


-- 
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] sending bulk emails

2001-11-02 Thread Robert Klinkenberg

Interesting, instead of blocking access to programming tricks because the
company wants to protect its investments (or the government doesn't like us
using it (think PGP)) we are now not telling people how to make good
software because somebody might use it to do something we (or some people)
don't like.

Robert Klinkenberg

-Oorspronkelijk bericht-
Van: Rick Emery [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, November 02, 2001 2:26 PM
Aan: PHP DB list
Onderwerp: RE: [PHP-DB] sending bulk emails


Opswe've just armed a potential spammer...


-- 
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] sending bulk emails

2001-11-03 Thread Robert Klinkenberg

Always nice to know when something is not too serious :-).

-Oorspronkelijk bericht-
Van: Rick Emery [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, November 02, 2001 5:05 PM
Aan: PHP DB list
Onderwerp: RE: [PHP-DB] sending bulk emails


my comment was humor.  we've already explored and killed this thread.


-- 
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] TREE in a database

2001-11-04 Thread Robert Vukovic

Thanks, that is exactly what I needed and it doesn't look so
complicated.

 -Original Message-
 From: John Lim [mailto:[EMAIL PROTECTED]] 
 Sent: 31. oktobar 2001. 16:44
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] TREE in a database
 
 
 Actually relational databases are set-based.  The answer to 
 your tree structures question is that it is possible. It is 
 quite complicated though, so have a look at this phphoo
 tutorial:
 
 http://www.webreference.com/perl/xhoo/php1/
 


-- 
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: Re: [PHP-DB] Problem with include()

2001-11-13 Thread Robert Böhm

The manual reads
include (\http://someserver/file.php?varone=1vartwo=2\;);
and...
require($DOCUMENT_ROOT . \/header.html\);

As you can see the upper one among the above line refers
to opening a remote file for inclusion via http.
If it the server is somewhat properly configured
you will not be able to download the script source for execution from there,
so it makes sense to pass parameters.
Which HTTP fortunately supports.

Unfortunately, local file systems do not necessarily support passing parameters to 
files being openend for read access.
Wich wouldn\'t make sense, because it\'s just being read, not executed.

It will tough be executed _after_ being read... As a part of the current runtime 
environment, sharing the same variable namespace, and stuff.






-- 
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] RE: [PHP-WIN] Can I rotate a gif with PHP

2001-11-02 Thread Robert Trembath

Hello Everyone,

I am generating some analylitical reports from a database using S-Plus
that produce a gif and then calling that gif as part of the report. But
I need to rotate this gif 90 degrees CW.

Can I do that with PHP?

Platform
-
W2K
MySQL
PHP 4.04

Let me clarify this. The app is written in PHP and I cannot find
anything that references rotating an image in the PHP docs. There is
some reference to rotating images in a pdf with PHP, but nothing else.

Anyone have any ideas?

--
Robert Trembath
Internet Technology Manager
e|[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] question

2001-12-12 Thread Robert Weeks

Yup,

I knew it was something really simple. I should never touch a computer 
before the coffee is brewed ;-)

Thanks!

Robert

On Wednesday, December 12, 2001, at 11:09 AM, Steve Cayford wrote:


 Do you want $$fname = $val here? Taking the string in $fname as the 
 name of a variable to which you are assigning $val.



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

2001-12-21 Thread Robert Weeks

I'm trying to use a hash to translate a value into something human readable. I know 
how to do this with an if-else but that seems like a waste of typing.

I have a bunch of items in the db and their values are abbreciations such as 'm_r'. I 
want m_r to show on the page as Mens Rings. I was trying to do it like this but echo 
$item returned Array:
?php

#query db and get a result snipped

$item = $row[item];

$item = array('Mens Ring' = m_r, 'Mens Charm' = m_c, 'Womens Ring' = w_r,'Womens 
Charm' = w_c); 

echo $item;

?

Any help would be appreciated.

thnx,

robert

 



Re: [PHP-DB] Hashes

2001-12-21 Thread Robert Weeks

Thanks,

Your assumptions were correct, I'll give that a try. 

I ended up doing this which doesn't seem as efficient:

$item_array = array('Mens Ring' = m_r, 
 'Mens Charm' = m_c, 
 'Womens Ring' = w_r,
 'Womens Charm' = w_c
 ); 

while (list($val, $key) = each($item_array)){
 if ($key == $item){
 $item_text = $val;
 }
} 
echo $item_text;

Thanks again,

Robert
- Original Message - 
From: Matthew Loff [EMAIL PROTECTED]
To: 'Robert Weeks' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, December 21, 2001 4:26 PM
Subject: RE: [PHP-DB] Hashes


 
 Robert--  
 
 You're on the right track...  I'm assuming $row is the result of a
 mysql_fetch_assoc() call, and $row['item'] contains the hashed value
 (either m_r, m_c, or whatever)... Try this:
 
 ?php
 
 $item_list = array('Mens Ring' = m_r, 'Mens Charm' = m_c, 'Womens
 Ring' = w_r,'Womens Charm' = w_c); 
 
 #query db and get a result snipped
 
 echo $item_list[$row['item']];
 
 ?
 
 Good luck,
 Matt
 
 
 -Original Message-
 From: Robert Weeks [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 21, 2001 11:27 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Hashes
 
 
 I'm trying to use a hash to translate a value into something human
 readable. I know how to do this with an if-else but that seems like a
 waste of typing.
 
 I have a bunch of items in the db and their values are abbreciations
 such as 'm_r'. I want m_r to show on the page as Mens Rings. I was
 trying to do it like this but echo $item returned Array:
 ?php
 
 #query db and get a result snipped
 
 $item = $row[item];
 
 $item = array('Mens Ring' = m_r, 'Mens Charm' = m_c, 'Womens Ring' =
 w_r,'Womens Charm' = w_c); 
 
 echo $item;
 
 ?
 
 Any help would be appreciated.
 
 thnx,
 
 robert
 
  
 
 


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

2002-02-05 Thread Robert Weeks

What exactly is the error message? Did you change config.php to use the name
of your database and your username  password?

I've found the articles at devshed to be helpful in the past. This
particular one has a pretty good explaination of setting up a user
authentication system:

http://www.devshed.com/Server_Side/PHP/TimeIsMoney/TimeIsMoney1/page1.html

Robert


On 2/5/02 9:50 AM, Jennifer Downey [EMAIL PROTECTED] wrote:

 All I want is to get the username into the database.
 As soon as test.php shows in browser, the Username, submit button and box ar
 e there but also
 it prints the There has been a problem. right off the bat. Now I know
 there are misprints in the book
 and I hope I was smart enough to catch them but maybe not. can someone
 please tell me what I have
 done wrong?
 
 Thanks for all your time.
 
 Jennifer Downey
 
 


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




Re: [PHP-DB] File Uploading... Two problems...

2002-02-05 Thread Robert Weeks

On 2/5/02 9:58 AM, Todd Williamsen [EMAIL PROTECTED] wrote:
 Now I have two small issues...
 
 1.  How would I automate the file naming otherwise errors will fly (can't
 copy file... blah blah)

You could replace the file name with a randomly generated number. There are
a number of ways to generate random numbers in PHP. Try this for starters:

http://www.php.net/manual/en/function.mt-rand.php
 
 2.  The second part is the most annoying.  It seems that I cannot get the
 script to put the files into a directory I specify only where the script
 resides.  I thought it was a permission issue, but the folder has been chmod
 to 777 and it still won't do it...

You need the path from root to the directory. Now you have:

home/sites/madden.williamsen.net/web/recruiter/resumes/$img1_name

You need a forward slash before home:

/home/sites/madden.williamsen.net/web/recruiter/resumes/$img1_name

Instead of using chmod 777 (ick!) you should change the ownership of the
file to be owned by the web server user which is usually nobody you can do
this with the chown command from the command line.

Robert
 
 Directory structure
 
 home
   web
   recruiter  --- folder where the scripts reside
   resumes --  the destination where I want the uploaded files to
 reside
 
 here is the code...
 
 ?
 
 // if $img_name isn't empty, try to copy the file
 if ($img1_name != ) {
 
 // copy the file to a directory or
 //die and print an error message
 
 // NOTE! if you're on a Windows machine,
 // use Windows pathnames, like so:
 // copy($img1, C:\\some\\directory\\path\\$img1_name);
 
 copy($img1,
 home/sites/madden.williamsen.net/web/recruiter/resumes/$img1_name)
 or die(Couldn't copy the file!);
 
 } else {
 
 // if $img_name was empty, die and let us know why
 die(No input file specified);
 
 }
 
 ?
 
 thanks
 
 
 


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




Re: [PHP-DB] Username

2002-02-05 Thread Robert Weeks

If you read to part 2 of the tutorial it has quite a bit on inserting data.

The reason there are tutorials and books are to teach the *concepts* behind
what they are showing you.

This is probably what is tripping you up; you create the table with uid as
an integer, auto increment, not null field, then your insert statement tries
to insert NULL into that field.

You need to change this:

$query = INSERT INTO users (uid, name) VALUES(NULL, $name);

To this:

$query = INSERT INTO users (name) VALUES ($name);

Robert


On 2/5/02 10:46 AM, Jennifer Downey [EMAIL PROTECTED] wrote:

 I am not getting an error message. The te.php is connecting to the data
 base. Just not doing what I want
 it to.
 
 While that is a very good tutorial (if I was just logging in) but it has
 nothing to do with inserting information
 into the database via a form.
 
 But thanks for the tut. It will come in handy when I get to that point in my
 learning stage.
 Jen


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




Re: [PHP-DB] File Uploading... Two problems...

2002-02-05 Thread Robert Weeks

Yeah,

My chown reference was to chowning the folder that the files are uploaded
to, not the indv. files.

Robert
- Original Message -
From: JD Daniels [EMAIL PROTECTED]
To: Todd Williamsen [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, February 05, 2002 12:21 PM
Subject: RE: [PHP-DB] File Uploading... Two problems...


 I believe when PHP saves a file, it is already owned by the web server
user.
 In my case, nouser. I could not get this behaviour to change.

 Normally you should not need to CHMOD or CHOWN anything you upload unless
 you need them to be modified by ftp users as well.
 Just make sure the folder is writeable by the web server user. (Preferably
 not by anybody else... 777 is all bad :)

 If you do end up CHMODing:
 On SCO, the CHMOD command did not behave like I expected it to... adding
the
 umask made it all good... ie,

 $rand_name=generate_filename(,jpg)

 file://Save The Uploaded File To Disk
 @copy($image,
 /home/sites/madden.williamsen.net/web/recruiter/resumes/$rand_name) or
 die(Couldn't Save File $image to $rand_name);

 (Note beginning slash... Robert helped you there :)

 file://Give It Perms
 umask(0);

chmod(/home/sites/madden.williamsen.net/web/recruiter/resumes/$temp_name,0
 600);
 (on my SCO box, 600 is the default perms anyway )

 Here is my little funtion I use to generate file names: (It is not mine..
 but I cant remember who gave it to me :)

 function generate_filename ($len = 8,$ext)
 {
 $nps = ;
 mt_srand ((double) microtime() * 100);

  while (strlen($nps)$len)
  {

  $c = chr(mt_rand (0,255));

  if (eregi(^[a-z0-9]$, $c)) $nps = $nps.$c;

  }

 $nps.=.$ext;
 return ($nps);

 }

 Of course, depending on what you are doing, completely random names may be
 useless... I save them as temporary files to resize them and save them in
a
 DB with the regular name with special chars stripped out.

 JD


 -Original Message-
 From: Robert Weeks [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 05, 2002 7:19 AM
 To: Todd Williamsen; [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] File Uploading... Two problems...


 On 2/5/02 9:58 AM, Todd Williamsen [EMAIL PROTECTED] wrote:
  Now I have two small issues...
 
  1.  How would I automate the file naming otherwise errors will fly
(can't
  copy file... blah blah)

 You could replace the file name with a randomly generated number. There
are
 a number of ways to generate random numbers in PHP. Try this for starters:

 http://www.php.net/manual/en/function.mt-rand.php

  2.  The second part is the most annoying.  It seems that I cannot get
the
  script to put the files into a directory I specify only where the script
  resides.  I thought it was a permission issue, but the folder has been
 chmod
  to 777 and it still won't do it...

 You need the path from root to the directory. Now you have:

 home/sites/madden.williamsen.net/web/recruiter/resumes/$img1_name

 You need a forward slash before home:

 /home/sites/madden.williamsen.net/web/recruiter/resumes/$img1_name

 Instead of using chmod 777 (ick!) you should change the ownership of the
 file to be owned by the web server user which is usually nobody you can
do
 this with the chown command from the command line.

 Robert
 
  Directory structure
 
  home
web
recruiter  --- folder where the scripts reside
resumes --  the destination where I want the uploaded files
to
  reside
 
  here is the code...
 
  ?
 
  // if $img_name isn't empty, try to copy the file
  if ($img1_name != ) {
 
  // copy the file to a directory or
  file://die and print an error message
 
  // NOTE! if you're on a Windows machine,
  // use Windows pathnames, like so:
  // copy($img1, C:\\some\\directory\\path\\$img1_name);
 
  copy($img1,
  home/sites/madden.williamsen.net/web/recruiter/resumes/$img1_name)
  or die(Couldn't copy the file!);
 
  } else {
 
  // if $img_name was empty, die and let us know why
  die(No input file specified);
 
  }
 
  ?
 
  thanks
 
 
 


 --
 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-DB] Viewing Session Varibles

2002-02-07 Thread Robert Weeks

Is there an easy way to get a dump to the page of all session varibles?

I'm trying to create an associtave array in a session varible named cart
($item1 =$qty1, $item3=$qty2, etc.) and i can't seem to wrap my brain
around it this morning. I get the item set but can't get the $qty to set.

Thanks,

Robert Weeks


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




Re: [PHP-DB] Viewing Session Varibles

2002-02-07 Thread Robert Weeks

Ok,

This is driving me nuts. I'm sure its something simple but I can't seem to
find the glitch.

I'm trying to make a simple shopping cart using Session varibles to store
the item = quantity pairs, then I loop thru the cart and query the db to
get the item details, etc.. Most of it works fine but whenever I add a new
item to the cart I lose the $qty value for the other items.

Here is the code in question:

++

?

session_start();

include 'inc/common.inc.php';

if (!session_is_registered(cart))
{
 $cart = array();
 session_register(cart);
 $items = 0;
 session_register(items);
}

if($cart[$new])
{
 $cart[$new]++;
}else{
 $cart[$new] = 1;
}

foreach ($cart as $id = $qty)
{
if ($$id == 0)
{
 unset ($cart[$id]);
}else{
 $cart[$id] = $$id;
}

$items = calculate_items($cart);

foreach ($cart as $id = $qty){

$db = mysql_connect(localhost, $databaseuser, $databasepasswd) or die
(Unable to connect to database!);

mysql_select_db ($databasename,$db) or die (Unable to connect to database
$db!);

$result = mysql_query (SELECT * from products WHERE id = '$id') or die
(Error in query.  . mysql_error());

if ($result){

extract(mysql_fetch_array($result));

echo bTitle:/b $titlebr /;
echo bDescription:/b $p_descbr /;
echo bPrice:/b $pricebr /;
echo bQuantity:/b $qtybr /;
echo hr /;
 }
}

#print varibles to screen for debugging

echopre;
print_r($HTTP_SESSION_VARS);
echo/pre;

?

+

If one item is in the cart I get this from the $HTTP_SESSION_VARS:

Array
(
[cart] = Array
(
[10] = 12
)

[items] = 12
[total_price] = 0.00
)

That would indicate to me that the cart pair has been saved.
But as I add items I lose the earlier quantities:

Array
(
[cart] = Array
(
[10] =
[16] =
[13] = 6
)

[items] = 6
[total_price] = 0.00
)

The $id is still there and I can query the db just fine, but no quantity.

I don't know why this is eluding me but any help would be greatly
appreciated.

Thanks,

Robert


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




[PHP-DB] Re: PHP IDE

2002-02-23 Thread robert janeczek

 After spending two frustrating hours tracking down a bug yesterday - only
to
 discover it was a misplaced quote mark. I've had it.

 I am looking for suggestions out there for a good IDE for PHP development,
 preferably one that doesn't cost an arm and a leg. I tried PHP4EE studio,
 but it is buggy as hell and kept crashing on me.

try zend studio - www.zend.com

rash



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




Re: [PHP-DB] mysql and file upload problems

2002-03-09 Thread Robert Weeks

Why don't you just do the sql insert *after* the file upload function?:

Pseudocode:

   if( NOT file upload attack, wrong file type, etc.){
   //copy the file to the permanaent location
//call function to insert file details into the database
   }
   else{
   //echo error to user
   }


On 3/9/02 10:21 AM, Carl E Shmidt [EMAIL PROTECTED] wrote:

 I have a standard multipart/enc form to allow users to upload files.
 Pseudocode:
 //call function to insert file details into the database
   if( NOT file upload attack, wrong file type, etc.){
   //copy the file to the permanaent location
   }
   else{
   //delete the record of file details from the database
   }
 
 I can have the file upload successfully, and the record is inserted into the
 database.  The problem is that if there are errors on file upload, then the
 record is never deleted from the database.  The file upload is resubmitting
 to the same page, and no redirection  takes place. WHat's going on?
 
 Carl
 
 


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




Re: [PHP-DB] MySQL and apostrophes, interesting problem. 42082

2002-03-10 Thread Robert Weeks

See the manual at php.net:

addslashes()
stripslashes()

I've found it easier to just turn on magic-quotes in the php.ini file

This is all covered at php.net

Robert
- Original Message - 
From: Nick Patsaros [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, March 10, 2002 11:23 AM
Subject: [PHP-DB] MySQL and apostrophes, interesting problem. 42082


 I'm working with a simple form which submits field
 data to a MySQL database.  This is for the purpose of
 generating a dynamic news page for my site. 
 Interestingly enough I've found that any time I try to
 submit data that contains an apostrophe ' it gives
 me an error and will not send the data (any of it) to
 the database. 
 
 How can I change my database query, or escape out
 apostrophes?  I'm looking for the easiest fix out
 there of course.  Below is my current DB query. I
 realize I'm using apostrophes for my variables... is
 this acceptable syntax and/or is there a replacement?
 
 $query = INSERT into $table values ('0', '$year',
 '$month', '$day', '$hour', '$minutes', '$seconds',
 '$article_name', '$content', '$admin_name');
 
 
 __
 Do You Yahoo!?
 Try FREE Yahoo! Mail - the world's greatest free email!
 http://mail.yahoo.com/
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




[PHP-DB] Newbie and having to convert from idc/htx format

2002-04-26 Thread Robert Webb

Ok, I have been somewhat tasked here to try and do a web conversion from 
the idc/htx format of Microsoft to a more portable format. I am looking 
and using php for my scripting. My current scripts are very simple. Here 
is my setup.

Microsoft IIS using idc/htx frontend
MSSQL backend database
All sql queries, inserts, etc.. are handled as stored procedures.
IDC files only pass data to the sql server via odbc.

As you can see we have setup the sql server to handle all the processing 
  of data. The web server only passes data put into the forms across to 
the sql server.

Here are my questions.

1.  What odbc would you recommend under Linux to connect to the mssql 
server.

2. Where would be a good place to go to get a feel on how I would write 
the code to pass the variable data over to the sql server.

3. Is this even easily obtainable. Or should I just start trying to 
re-write the entire site.

Also I am including below a sample of what our idc file looks like.

*Of course names have been changed to protect the guilty. ;-)

Datasource: Contacts
Template: view_entry.htx
SQLStatement: DECLARE typesearch varchar(50)
+select typesearch = '%R1%'
+if typesearch = 'name'
+Begin
+execute sp_corporate_wide_database_search '%name%', '%classification%'
+End
+if typesearch = 'company'
+begin
+execute sp_main_company_search '%name%', '%classification%'
+end


I am on a tight schedule with this. Otherwise I would be only digging 
into any manual I could find first.


Thanks,
Robert


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




Re: [PHP-DB] how to format the output of the text info that user uploaded?

2002-08-19 Thread Robert Parker

On Sunday 18 August 2002 04:22 pm, you wrote:
 I have a field in a form which allows user to upload thier biographys.Once
 they upload a bunch of texts,the script I wrote automatically show it on a
 webpage, however, the contents are all scrambled toghther without line
 break and formatting..
 How am I able to show the formatted outputs?

 I tried to use pre /pre, but it didn't work well.
I suspect that those tags are the problem,  because you are
telling the browser that this output has been formatted already.
Try using p .. /p and let the browser format the text.
That way any \n, extra spaces etc will just be ignored.

 Any suggestions?

 Thank you!

 Bo

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




FW: [PHP-DB] php-db-unsubscribe@lists.php.net

2002-09-10 Thread Robert DelGarbino



-Original Message-
From: rdelgar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 9:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] [EMAIL PROTECTED]


[EMAIL PROTECTED]

Sincerely, 
Robert 


-- 
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] DEALING WITH RETRIEVING AND WRITING DATE VALUE FROM/TO TABLE

2002-10-09 Thread Robert Leahong




I need to know how to retrieve a date field from a database
table using MYSQL_DB_QUERY to create recordset. As well as
writing a Date Variable to a table using MYSQL_QUERY  .



YOURS Truly,
Robert Leahong.
[EMAIL PROTECTED]




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




[PHP-DB] Fw: Dows anyone know why this was bounced?

2002-10-31 Thread Robert Twitty
Does anyone know why all mail that I send to any aspect of the php-db list
is bounced when it is sent from the address below?

-- bob

- Original Message -
From: Robert Twitty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 31, 2002 9:39 PM
Subject: Returned mail: see transcript for details (fwd)




 -- Forwarded message --
 Date: Thu, 31 Oct 2002 19:45:12 -0500 (EST)
 From: Mail Delivery Subsystem [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Returned mail: see transcript for details

 The original message was received at Thu, 31 Oct 2002 19:45:12 -0500 (EST)
 from neutron.ushmm.org [207.77.113.18]

- The following addresses had permanent fatal errors -
 [EMAIL PROTECTED]
 (reason: 553 This entry was last confirmed open on 2/16/2002)

- Transcript of session follows -
 ... while talking to pair1.php.net.:
  RCPT To:[EMAIL PROTECTED]
  553 This entry was last confirmed open on 2/16/2002
 550 5.1.1 [EMAIL PROTECTED]... User unknown


---BeginMessage---



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


[PHP-DB] ODBTP, a possible solution for MS-SQL and other databases

2002-11-01 Thread Robert Twitty
 Employees ) or die;

odbtp_prepare( {? = call AddEmployee( ?, ?, ?, ?, ?, ? )}, $qry1 ) or
die;
odbtp_out( $qry1, 1 );

$qry2 = odbtp_allocate_query() or die;
odbtp_prepare( {call SetEmployeeNotes( ?, ? )}, $qry2 ) or die;

function AddEmployee( $qry, $ExtId, $LastName, $FirstName, $Title,
$Salary, $JobDesc )
{
odbtp_in( $qry, 2, $ExtId );
odbtp_in( $qry, 3, $LastName );
odbtp_in( $qry, 4, $FirstName );
odbtp_in( $qry, 5, $Title );
odbtp_in( $qry, 6, $Salary );
if( $JobDesc != ODB_DEFAULT )
odbtp_in( $qry, 7, $JobDesc );
else
odbtp_in( $qry, 7 );

odbtp_execute( $qry ) or die;
$out = odbtp_fetch_output( $qry ) or die;
return $out[1];
}
function SetEmployeeNotes( $qry, $Id, $Notes )
{
odbtp_in( $qry, 1, $Id );
odbtp_in( $qry, 2, $Notes );
odbtp_execute( $qry ) or die;
}
$Id = AddEmployee( $qry1, 111222333444555, Twitty, Robert, ODBTP
Creator, .2, ODB_DEFAULT );
SetEmployeeNotes( $qry2, $Id, I've added my 2 cents worth to PHP. );

$Id = AddEmployee( $qry1, 311322343454685, Johnson, Mary,
Supervisor, 10, Supervises folks );
SetEmployeeNotes( $qry2, $Id, She can read greek:  - ? Dr. ???
? );

$Id = AddEmployee( $qry1, 568899902133452, Smith, John, CEO,
38020979.46, NULL );
SetEmployeeNotes( $qry2, $Id, He's the guy that makes all the
money. );

$Id = AddEmployee( $qry1, 109, Gordon, Susan,
Computer Programmer, 73144.57, Makes web-based applications );
SetEmployeeNotes( $qry2, $Id, Single quotes (') and double quotes (\)
are not a problem when you do data binding. );

odbtp_commit();
?
html
head
titleODBTP Test - Initialization/title
meta http-equiv=Content-Type content=text/html; charset=utf-8
/head
body
?php
odbtp_query( SELECT * FROM Employees ) or die;

$cols = odbtp_num_fields( $qry1 );

echo table cellpadding=2 cellspacing=0 border=1\n;
echo tr;
for( $col = 0; $col  $cols; $col++ )
echo thnbsp; . odbtp_field_name( $qry1, $col ) . nbsp;/th;
echo /tr\n;

odbtp_bind_field( $qry1, DateEntered, ODB_CHAR ) or die;

while( ($rec = odbtp_fetch_array($qry1)) )
{
echo tr;
for( $col = 0; $col  $cols; $col++ )
echo tdnobrnbsp;$rec[$col]nbsp;/nobr/td;
echo /tr\n;
}
echo /table\n;

odbtp_close();
?
/body
/html



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




Re: [PHP-DB] Re: ODBTP, a possible solution for MS-SQL and other databases

2002-11-02 Thread Robert Twitty
Thanks for the tip.  I will take this issue to the PHP-DEV list.

-- bob

- Original Message -
From: l0t3k [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 02, 2002 2:31 AM
Subject: [PHP-DB] Re: ODBTP, a possible solution for MS-SQL and other
databases


 Robert,
   this seems like an excellent idea. you should present in PHP-DEV,
though,
 since this NG is primarily for userland PHP users, not low-level PHP
 developers.

 l0t3k




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




[PHP-DB] Is MySQL available from my host.

2003-01-03 Thread Robert Wagner
I recently signed up with a low-cost web server, in order to do some
web-page accessed database work. The server has PHP Version 4.0.6 and
phpinfo() yields (in part):

  PHP Version 4.0.6

  System SunOS src 5.7 Generic_106541-12 sun4u sparc
SUNW,UltraSPARC-IIi-cEngine
  Build Date Feb 28 2002
  Configure Command  './configure' '--disable-pear' '--enable-ftp'
'--with-sybase-ct=/usr/local/freetds' '--enable-trans-sid'
'--enable-force-cgi-redirect'
  Server API CGI
  Virtual Directory Support disabled
  Configuration File (php.ini) Path /usr/local/affinity/etc/php.ini
  ZEND_DEBUG disabled
  Thread Safety disabled

   This program makes use of the Zend scripting language engine:
  Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend Technologies



 |
(Some output omitted here)
 |
mysql
  MySQL Support enabled
  Active Persistent Links 0
  Active Links 0
  Client API version 3.23.32
  MYSQL_MODULE_TYPE builtin
  MYSQL_SOCKET /tmp/mysql.sock
  MYSQL_INCLUDE
  MYSQL_LIBS



  Directive Local Value Master Value
  mysql.allow_persistent
 On On
  mysql.default_host
 no value no value
  mysql.default_password
 no value no value
  mysql.default_port
 no value no value
  mysql.default_socket
 no value no value
  mysql.default_user
 no value no value
  mysql.max_links
 Unlimited Unlimited
  mysql.max_persistent
 Unlimited Unlimited


ftp
  FTP support enabled


Additional Modules


Environment
  Variable Value
  TZ US/Pacific
  DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
  HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/msword,
application/vnd.ms-powerpoint, application/x-shockwave-flash, */*
  HTTP_ACCEPT_ENCODING gzip, deflate
  HTTP_ACCEPT_LANGUAGE en-us
  HTTP_CONNECTION Keep-Alive
  HTTP_HOST www.mymain.com  (Renamed for his message!)
  HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
  PATH /usr/bin:/bin:/usr/local/bin
  REDIRECT_DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
  REDIRECT_STATUS 200
  REDIRECT_URL /Experiments/PHP_Info.php
  REMOTE_ADDR (Deleted for this message)
  REMOTE_PORT 7016
  SCRIPT_FILENAME /usr/local/apache/cgi-bin/php.cgi
  SERVER_ADDR 10.3.1.126
  SERVER_ADMIN [EMAIL PROTECTED]  (Renamed for his message!)
  SERVER_NAME www.mymain.com  (Renamed for his message!)
  SERVER_PORT 80
  SERVER_SIGNATURE
  SERVER_SOFTWARE Apache/1.3.26 (Unix) mod_mhp mod_mhp_log
mod_virtcgi frontPage/5.0 mod_status_mhp
  GATEWAY_INTERFACE CGI/1.1
  SERVER_PROTOCOL HTTP/1.1
  REQUEST_METHOD GET
  QUERY_STRING
  REQUEST_URI /Experiments/PHP_Info.php
  SCRIPT_NAME /bin/php.cgi
  PATH_INFO /Experiments/PHP_Info.php
  PATH_TRANSLATED
/nfs/cust/9/36/06/260639/web/ET_Experiments/PHP_Info.php
  REMOTE_HOST (Deleted for this message)


 |
(Moreoutput omitted after this)



begin 666 PHP_Info.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
M1TE.#EA@@!#`-7_`# O,0(`P'IB8RYF9S):6R).3PP,#!%M;::2D
MLD5%23$SHV.O8B)M)B9NV5GAGZ!K+RS1D:)#$T22$C,45)9%)8?V]WJ,G,
MW5%?GU5CHV%IDPT.$Z*IS;]W%AGI5QJJ5IHI5MIIE]NK9SKEUIGHN6Q92
MRMO=Y# P (`0,#`@'!@\/#H6%@YB8EW)Q;@4$`Q03$A\'2F)0H)1D8
M#T\/+WMU%140P,# 4%!0$!`?___P```'Y! $``H`+ `$,`0 ;_
M0)5P2P:C\ADDL!L.I]0@G)*K5JO1H+A#!(*EP*N-I8$*;-$@DKG?\+A\
M3@^Y128.9 ])[#$.#5P6(5(6PT/BA@@('2/D' :'C `EI8[8R1G)UO(2$7
MP$!X -A(9! 1!B(QL?96,PDQNC$Z.ZVESPY*!DSP#0ZRDX-,6
M+0P1/C' .[F[;[.`PP)8YS(2 3`!,0$:A46QP)K$;)SDKP# W(:']3T
ME;8T*=\D?7@!S :##PP0`'OQ00.^#_ULQ8@`[A)P)X^(EP@$HK=FTB@BP
M8)M)2SP6Y$B!04.$##P6-H0#`D.%L!B9/!1Z^0V_Q8X%'P@:\30T#``38
MV!+`0,-(NQI]V8#@7.IPHJOKPQS.7@3TB?$Q0X`!E#P`ZBI*G4'CB(
MH(/A'8ARKU9#:$B0L6`M2@0:/V@L0,$1PT.6MX\=GF[ATDN@\L1,FO
MS)GSYN5N71)!;FTZ2Q:)G,IX$:P:P;BK4!(D68,[_P*YW;\6+0X\F
M?;JXBLD/6LMN4)-WKVS8KB8/AU'A(5]X;SRR!L@2GAO?HGDL'1 D4@2@
MSKZ]BQDU=+S(D*YK 8Y6 !KL/]C0#R93!4(]+XXIY[\,DGFSAT7'2##.:@
M0YPZ=''0E08212)09O01/]!C4`X,/)=FR0 8CY72#H`$T *6!EPLY
M.)!=BB)D@ ,P,W@0PG-QH(%6`.T, 4KO+G30@EI/+1#Y\(.4'].708E@^
MR'C)CDTP)4L\?1 #XS-V*)#E%-6V5-.]AA%`0`W^,8%5#I82$=^1!DRPP`
M;=#(GVL`^0:@@)Y':,I: B PJ(R@;9%'S@X67,#!G) A0M=4'#RJG78K
MMJ561I8@%8YE286R(3J8.(7*[49=L=_5FPJVXLJ$KKK?VML%02KC X+
M%+N !0D@=I=B@8S6ZK-8I:9:I159NVUUXHVR+1/0NM%:D-\@6,8H3!@ '
MS(7_00EVK*CH8!^@8N+)#ZUW!=+MMV]IP85R]$E@A@A^WMB)4DK#[
M@NYE1QY]!,M6LZQ^BYP'GC@`%$-[U53!CO(Y-GG?QX02\XZ, !.N*=ML5G
M$:1(1QL+UVPS=AIDUX:.P.A0W\T@Y R''8;'3V/E91P@6U'!#!46Z50@K
M#BC6(216@7323JPE,\^6V^C@ 3Y,! V-LL,#%HA)PI2'WE DK%\;$-.
M#6F@]STE9* H`#ADN5\T!:^1WIJ6T/B!DWCKO?(?2LPCRT!M/E(!644V3%
M1+2AY('AY!!`#UGL$8=@.S``,XV5+/RZ $ 'K.:5 _R(P.3P(^I-D.Y
MY199`$ 'ECK 60'L ,Z)U\?YTC; 0=0@IZFNE#F9DD,7(GP8HHD[56^)
M_6!LV+.?CNS`/ 67=#1N?$;80!#BC?R08:(EVSRE$0 ONNGM.=(Y1I?VE
MC0'F@1%!- #EP`$,C0BON8@([G,!#)!![C#P3#0YP,-0$,;-A!,70
M@R008 E/R,'%M2Y[+27@1 

[PHP-DB] Re: Is MySQL available from my host.

2003-01-03 Thread Robert Wagner
Robert Wagner [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I recently signed up with a low-cost web server, in order to do some
 web-page accessed database work. The server has PHP Version 4.0.6 and
 phpinfo() yields (in part):

   PHP Version 4.0.6

   System SunOS src 5.7 Generic_106541-12 sun4u sparc
 SUNW,UltraSPARC-IIi-cEngine
   Build Date Feb 28 2002
   Configure Command  './configure' '--disable-pear' '--enable-ftp'
 '--with-sybase-ct=/usr/local/freetds' '--enable-trans-sid'
 '--enable-force-cgi-redirect'
   Server API CGI
   Virtual Directory Support disabled
   Configuration File (php.ini) Path
/usr/local/affinity/etc/php.ini
   ZEND_DEBUG disabled
   Thread Safety disabled

This program makes use of the Zend scripting language engine:
   Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend Technologies



  |
 (Some output omitted here)
  |
 mysql
   MySQL Support enabled
   Active Persistent Links 0
   Active Links 0
   Client API version 3.23.32
   MYSQL_MODULE_TYPE builtin
   MYSQL_SOCKET /tmp/mysql.sock
   MYSQL_INCLUDE
   MYSQL_LIBS



   Directive Local Value Master Value
   mysql.allow_persistent
  On On
   mysql.default_host
  no value no value
   mysql.default_password
  no value no value
   mysql.default_port
  no value no value
   mysql.default_socket
  no value no value
   mysql.default_user
  no value no value
   mysql.max_links
  Unlimited Unlimited
   mysql.max_persistent
  Unlimited Unlimited


 ftp
   FTP support enabled


 Additional Modules


 Environment
   Variable Value
   TZ US/Pacific
   DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
   HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
 application/vnd.ms-excel, application/msword,
 application/vnd.ms-powerpoint, application/x-shockwave-flash, */*
   HTTP_ACCEPT_ENCODING gzip, deflate
   HTTP_ACCEPT_LANGUAGE en-us
   HTTP_CONNECTION Keep-Alive
   HTTP_HOST www.mymain.com  (Renamed for his message!)
   HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1)
   PATH /usr/bin:/bin:/usr/local/bin
   REDIRECT_DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
   REDIRECT_STATUS 200
   REDIRECT_URL /Experiments/PHP_Info.php
   REMOTE_ADDR (Deleted for this message)
   REMOTE_PORT 7016
   SCRIPT_FILENAME /usr/local/apache/cgi-bin/php.cgi
   SERVER_ADDR 10.3.1.126
   SERVER_ADMIN [EMAIL PROTECTED]  (Renamed for his message!)
   SERVER_NAME www.mymain.com  (Renamed for his message!)
   SERVER_PORT 80
   SERVER_SIGNATURE
   SERVER_SOFTWARE Apache/1.3.26 (Unix) mod_mhp mod_mhp_log
 mod_virtcgi frontPage/5.0 mod_status_mhp
   GATEWAY_INTERFACE CGI/1.1
   SERVER_PROTOCOL HTTP/1.1
   REQUEST_METHOD GET
   QUERY_STRING
   REQUEST_URI /Experiments/PHP_Info.php
   SCRIPT_NAME /bin/php.cgi
   PATH_INFO /Experiments/PHP_Info.php
   PATH_TRANSLATED
 /nfs/cust/9/36/06/260639/web/ET_Experiments/PHP_Info.php
   REMOTE_HOST (Deleted for this message)
 (Moreoutput omitted after this)
---
When I posted my original message, I forgot to include the result I'm
getting from the script:
?php
   mysql_connect() or
   die(Could not connect (sob):  . mysql_error());
   printf (MySQL host info: %s\n, mysql_get_host_info());
?
--
The result:
--
Warning: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2) in
/nfs/cust/9/36/06/260639/web/ET_Experiments/MySQL_Info.php on line 7

Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (2) in
/nfs/cust/9/36/06/260639/web/ET_Experiments/MySQL_Info.php on line 7
Could not connect (sob): Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2)
---



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




Re: [PHP-DB] Re: Is MySQL available from my host.

2003-01-03 Thread Robert Wagner
Richard:
Thanks for your rapid reply. What their tech support is saying is
 Sorry, we do not offer a database server. 
Based on the results of the phpinfo output, is that possible?
Thanks again,
Robert
--
Richard Hutchins [EMAIL PROTECTED] wrote in message
1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC">news:1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC...
 I know when I first started working with a host that provided MySQL
support,
 there was a very specific path I had to use in the connection string
because
 ...the MySQL server is behind a very strict firewall. If I didn't
use the
 path exactly as their prototype indicated, I'd get errors like you
have
 posted.

 I'd suggest you check your host's self-help tech support pages, drop
them an
 e-mail or call them.

  -Original Message-
  From: Robert Wagner [mailto:[EMAIL PROTECTED]]
  Sent: Friday, January 03, 2003 4:27 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Re: Is MySQL available from my host.
 
 
  Robert Wagner [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I recently signed up with a low-cost web server, in order
  to do some
   web-page accessed database work. The server has PHP Version
  4.0.6 and
   phpinfo() yields (in part):
  
 PHP Version 4.0.6
  
 System SunOS src 5.7 Generic_106541-12 sun4u sparc
   SUNW,UltraSPARC-IIi-cEngine
 Build Date Feb 28 2002
 Configure Command  './configure' '--disable-pear'
  '--enable-ftp'
   '--with-sybase-ct=/usr/local/freetds' '--enable-trans-sid'
   '--enable-force-cgi-redirect'
 Server API CGI
 Virtual Directory Support disabled
 Configuration File (php.ini) Path
  /usr/local/affinity/etc/php.ini
 ZEND_DEBUG disabled
 Thread Safety disabled
  
  This program makes use of the Zend scripting language
engine:
 Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend
Technologies
  
  
  
|
   (Some output omitted here)
|
   mysql
 MySQL Support enabled
 Active Persistent Links 0
 Active Links 0
 Client API version 3.23.32
 MYSQL_MODULE_TYPE builtin
 MYSQL_SOCKET /tmp/mysql.sock
 MYSQL_INCLUDE
 MYSQL_LIBS
  
  
  
 Directive Local Value Master Value
 mysql.allow_persistent
On On
 mysql.default_host
no value no value
 mysql.default_password
no value no value
 mysql.default_port
no value no value
 mysql.default_socket
no value no value
 mysql.default_user
no value no value
 mysql.max_links
Unlimited Unlimited
 mysql.max_persistent
Unlimited Unlimited
  
  
   ftp
 FTP support enabled
  
  
   Additional Modules
  
  
   Environment
 Variable Value
 TZ US/Pacific
 DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
 HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg,
  image/pjpeg,
   application/vnd.ms-excel, application/msword,
   application/vnd.ms-powerpoint, application/x-shockwave-flash, */*
 HTTP_ACCEPT_ENCODING gzip, deflate
 HTTP_ACCEPT_LANGUAGE en-us
 HTTP_CONNECTION Keep-Alive
 HTTP_HOST www.mymain.com  (Renamed for his message!)
 HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT
  5.1)
 PATH /usr/bin:/bin:/usr/local/bin
 REDIRECT_DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
 REDIRECT_STATUS 200
 REDIRECT_URL /Experiments/PHP_Info.php
 REMOTE_ADDR (Deleted for this message)
 REMOTE_PORT 7016
 SCRIPT_FILENAME /usr/local/apache/cgi-bin/php.cgi
 SERVER_ADDR 10.3.1.126
 SERVER_ADMIN [EMAIL PROTECTED]  (Renamed for his
message!)
 SERVER_NAME www.mymain.com  (Renamed for his message!)
 SERVER_PORT 80
 SERVER_SIGNATURE
 SERVER_SOFTWARE Apache/1.3.26 (Unix) mod_mhp mod_mhp_log
   mod_virtcgi frontPage/5.0 mod_status_mhp
 GATEWAY_INTERFACE CGI/1.1
 SERVER_PROTOCOL HTTP/1.1
 REQUEST_METHOD GET
 QUERY_STRING
 REQUEST_URI /Experiments/PHP_Info.php
 SCRIPT_NAME /bin/php.cgi
 PATH_INFO /Experiments/PHP_Info.php
 PATH_TRANSLATED
   /nfs/cust/9/36/06/260639/web/ET_Experiments/PHP_Info.php
 REMOTE_HOST (Deleted for this message)
   (Moreoutput omitted after this)
  ---
  When I posted my original message, I forgot to include the result
I'm
  getting from the script:
  ?php
 mysql_connect() or
 die(Could not connect (sob):  . mysql_error());
 printf (MySQL host info: %s\n, mysql_get_host_info());
  ?
  --
  The result:
  --
  Warning: Can't connect to local MySQL server through socket
  '/tmp/mysql.sock' (2) in
  /nfs/cust/9/36/06/260639/web/ET_Experiments/MySQL_Info.php on line 7
 
  Warning: MySQL Connection Faile

Re: [PHP-DB] Re: Is MySQL available from my host.

2003-01-06 Thread Robert Wagner
At www.download.com I located PHP Triad, but I'm a bit nervous, although
the overall ratings for the package are high. Here are my concerns:
  1) Some people couldn't install it all.
  2) Apparently it MUST be installed on drive C. While I have over 500
MB in C:,
   it's merely my boot drive in a multi-boot installation. I
normally boot to my
   WinXP partition. I'd rather install it elsewhere.
  3) I do want to install it under Win XP.
  4) I already have MySQL installed, and I'm guessing that it's a later
version.

Do any of these represent serious barriers to installing PHP Triad?

Thanks to you, Richard and others for past and future help.
Robert
Matthew Moldvan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]..
.
 Exactly what I was going to say ... go to www.download.com and search
for
 PHP Triad, which is PHP, Apache, and MySQL all in one for Windows, all
FREE.

 And yes, some web hosts are too cheap to give database access to their
 clients for their money.  If you want a good host, I can refer you to
one
 for a very reasonable price ...

 Regards,
 Matthew Moldvan

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

 -Original Message-
 From: Hutchins, Richard [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 03, 2003 4:50 PM
 To: 'Robert Wagner'; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Re: Is MySQL available from my host.


 I'm pretty sure it is possible. Unless I'm wrong, PHP, by default, is
 compiled with MySQL support. So, what you're seeing could be a result
of
 that default condition. Just because it's compiled with support for
MySQL,
 doesn't necessarily mean that they will provide the database server.

 Please, other list members correct me if I'm wrong.

 On the other hand, you don't need a web host to try out dynamic web
pages.
 You can configure Apache, MySQL and PHP on your local machine and do
 everything locally that you would do remotely.

  -Original Message-
  From: Robert Wagner [mailto:[EMAIL PROTECTED]]
  Sent: Friday, January 03, 2003 4:48 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] Re: Is MySQL available from my host.
 
 
  Richard:
  Thanks for your rapid reply. What their tech support is saying is
   Sorry, we do not offer a database server. 
  Based on the results of the phpinfo output, is that possible?
  Thanks again,
  Robert
  --
  Richard Hutchins [EMAIL PROTECTED] wrote
  in message
  1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC">news:1EA7D3AE70ACD511BE6D006097A78C1E022BFC21@USROCEXC...
   I know when I first started working with a host that provided
MySQL
  support,
   there was a very specific path I had to use in the connection
string
  because
   ...the MySQL server is behind a very strict firewall. If I
didn't
  use the
   path exactly as their prototype indicated, I'd get errors like you
  have
   posted.
  
   I'd suggest you check your host's self-help tech support pages,
drop
  them an
   e-mail or call them.
  
-Original Message-
From: Robert Wagner [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 4:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: Is MySQL available from my host.
   
   
Robert Wagner [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I recently signed up with a low-cost web server, in order
to do some
 web-page accessed database work. The server has PHP Version
4.0.6 and
 phpinfo() yields (in part):

   PHP Version 4.0.6

   System SunOS src 5.7 Generic_106541-12 sun4u sparc
 SUNW,UltraSPARC-IIi-cEngine
   Build Date Feb 28 2002
   Configure Command  './configure' '--disable-pear'
'--enable-ftp'
 '--with-sybase-ct=/usr/local/freetds' '--enable-trans-sid'
 '--enable-force-cgi-redirect'
   Server API CGI
   Virtual Directory Support disabled
   Configuration File (php.ini) Path
/usr/local/affinity/etc/php.ini
   ZEND_DEBUG disabled
   Thread Safety disabled

This program makes use of the Zend scripting language
  engine:
   Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend
  Technologies



  |
 (Some output omitted here)
  |
 mysql
   MySQL Support enabled
   Active Persistent Links 0
   Active Links 0
   Client API version 3.23.32
   MYSQL_MODULE_TYPE builtin
   MYSQL_SOCKET /tmp/mysql.sock
   MYSQL_INCLUDE
   MYSQL_LIBS



   Directive Local Value Master Value
   mysql.allow_persistent
  On On
   mysql.default_host
  no value no value
   mysql.default_password
  no value no value
 

[PHP-DB] Problem w/ generating png on Linux with more than 250 objects ona single graphic

2003-01-15 Thread Robert Trembath
I have an application that records DNA fingerprints(gel images) in 
digital form in a MySQL Database. Each fingerprint consists of an array 
of 2000 values between 0-255 that represent a grayscale color. I use the 
code below to create an image or fingerprint from the data.

code
---
$y3 = array( 2000 values from MySQL resulta formatted );
//set positions and draw image
$pos1 = 225;
$pos2 = 226;
$pic=ImageCreate(2290,50);
$col1=ImageColorAllocate($pic,200,200,200);
foreach ($y3 as $val)
   {
   unset( $color );
   $color = ( 255 - $val);
   //$color = $value;
   $col=ImageColorAllocate($pic,$color,$color,$color);
   Imageline($pic,$pos1,6,$pos1,44,$col);
   $pos1++;
   }
ImagePNG($pic,../images/bar$ID.png);
ImageDestroy($pic);

I've check the array for min,max and number of values and the array data 
is great. It starts drwing the image which consists of  a gray 
background  and a line being drawn for each value as it loop though the 
2000 values in the array, each having a different color value and a 
position that places the each line next to the last generates the 
correct Imageline() statement on the fly.

Here's the problem, after about drawing 250 or so line objects, it stops 
drawing the values and I get nothing but gray or white for the rest of 
the image. I reduced the dataset to 400 values to test this and I get 
the same result.

Is there a limitation in GD or PHP that would cause this or is there an 
error in my code. I've attached copies of the images that PHP is 
generating so you can see what is happening. These images contain the 
curve and two images PHP draws, the first is a line graph  from JPGraph 
showing the curve and the second is the gel image below the graph. The 
gel image in the fingerprint I am having trouble with. Both example stop 
generating line objects after about 250 lines as seen in the examples.

Attachments:
sample1.gif  --  zoom in of first 400 points of sample in sample2.gif 
containing only 400 values
sample2.gif  --  entire DNA fingerprint of 2000 values

My configuration is:
Red Hat 7.3 with all current updates for that release apache 1.3 and PHP 
4.1.2

Any ideas on how to get this to work properly?

Thanks in advance for your help and advise!
Robert Trembath
CSE
e| [EMAIL PROTECTED]
Bacterial BarCodes, Inc.
Houston, TX


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


[PHP-DB] Links to samples from Problem w/ generating png on Linux

2003-01-15 Thread Robert Trembath
The images were stripped on my post but here's an external link to the 
images I refer to:

Sample1 : http://linux.diversilab.com/sample1.gif
Sample2 : http://linux.diversilab.com/sample2.gif

Thanks,
Robert



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



[PHP-DB] Path string problem

2003-01-16 Thread Robert Wagner
I know (NOW!) that I shouldn't have installed PHP or Apache in a
directory where there is a space in the path string (Like H:\program
files\,mydir\.) But I really don't want to have to reinstall everthing
to fix the problem.

I'm running PHP with Apache as a local host on my Win XP system, but I
get into trouble when I try to use include_once in my php script for a
page. The file, myfile.php, I want to include is in the SAME directory
as the script file. Is there a way to specify this in the argument for
include_once?

For testing, I added
If (!file_exists(Somepathname/myfile.php)){
die (File path is wrong!);}
I've tried many variations on Somepathname (with both forward and
backward slashes), but they all fail.

Is there a way out of this mess?

TIA for any help on this.
Robert





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




[PHP-DB] Re: SapDB

2003-02-19 Thread Robert Sundström
In article 002001c29d40$007a5480$0533010a@hercules, [EMAIL PROTECTED] (Alejandro 
Michelin Salomon \) wrote:
In this moment i need odbc for access sapdb Databases.
In php the development, is plan to have a sapdb extension ?

Why would you need that?  Most databases expose a standardized interface 
(ODBC) and it is up to PHP to provide a decent implementation to that 
specification, something PHP unfortunately is lacking. 

For some reason I suspect that it is equally hard to provide a decent ODBC 
implementation than invent another one based in a proprietary SapDB 
interface... :-)


-
Robert Sundström, Mimer SQL Development
Upright Database Technology AB, http://www.mimer.com
Validate your SQL statements/procedures at http://developer.mimer.com/parser

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




[PHP-DB] mysql database ****.sql thru a php script

2003-03-23 Thread Robert Race
I have a large sql file that I would like to load into mysql database from a
remote client.  Is there a way through a php script to do this?

I have tried $query =  contents of database.sql ; (where the contents of
the sql file was pasted into the query)

then $results = mysql_db_query(database, $query);

but it fails.  Any ideas or experience?

R Race



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



[PHP-DB] PHP 4.2.1 and Oracle9i

2003-05-31 Thread Robert Varner
Can anyone tell me whether PHP 4.x will continue to operate with Oracle9i
using the PHP OCI calls?  I understand that PHP may have to be recompiled
again for Oracle9i.

[EMAIL PROTECTED]



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



Re: [PHP-DB] Query takes to much time

2003-06-04 Thread Robert Twitty
What database are you using?

Also, are all the fields involved in the joins and whare clause
properly indexed?  Depending on the database you are using, it is possible
to determine if the indexed fields are being used.

-- bob

On Tue, 3 Jun 2003, André Sannerholt wrote:

 Hi everybody,

 now I have the following qery that still needs to much time:

 select distinct Anschriften.ID as aid, Anschriften.PLZ as aplz,
 Anschriften.STRASSE as astrasse, Anschriften.HNR as ahnr from Anschriften
 inner join Master on Anschriften.ID=Master.A
 inner join Master as m on Master.FN=m.FN
 inner join Personen on m.NN=Personen.ID
 where Personen.ID = $id

 It gives me the correct results
 I hope you can help me to get it faster!

 André



 --
 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] Anyone know what Error 502 Bad Gateway means?

2003-04-12 Thread Robert Johnson
Hi all. I'm getting this error using Dreamweaver MX, php and mysql on a IIS
server over my intranet.  I can't figure out what it means... it happens
when I try to connect to a table using php.

TIA,

Robert



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



[PHP-DB] Count database-values

2003-06-10 Thread Robert Wanadoo
Hi everybody,

I've got a little problem, which I can't solve. It is as follow:
In my database I made a table with different fields.
One of the fields is named 'bedrag' and contains a numeric value like 15.47 or 78.16 
and so on.
If I want a value of the table I use in most cases the following code:

?
$squery = mysql_query(SELECT * FROM finance WHERE posneg = 'af',$db);
while($row = mysql_fetch_array($squery)) {

$bedrag = $row[bedrag];
echo $bedragbr;
}
?

In this case I receive a list like:
15.47
78.16
and so on...

So far no problems, but I want to count all these values. I tried with SUM but with 
the following code it doesn't work:

$squery = SELECT SUM(bedrag) AS Total FROM finance WHERE posneg = 'af';

any suggestions how to do? I want to store it in a variabele ($total) so I can echo 
it. (E.g.: $total = 93.63 in this case)

Thanx in advance,

Robert van der Mast



Re: [PHP-DB] how to update field without using UPDATE query? youare kidding?

2003-06-10 Thread Robert Twitty
In order o update fields without using a UPDATE statement you
have to use a cursor.  In general, this is how ADO (the technology used by ASP)
performs its updates in the manner you outlined below.  There are no
extensions bundled with PHP of which I am aware that allow you to update
data via a cursor.

-- bob

On Mon, 9 Jun 2003, Steve B. wrote:

 Hi
 in asp it lets me say
 ~get a record into dbrec which is a database object.
 dbrec['field1'] = 'wow'
 dbrec.update;

 is there no way to do this in linux?
 thats lame if it is then that means my 25 web sites have to be re-written to work on 
 Linux.


 --- Becoming Digital [EMAIL PROTECTED] wrote:
  I assume you lack update permissions, which means you probably don't have the
  other permissions necessary to change data.  Assuming you actually do, you could
  use REPLACE or DELETE followed by INSERT.
 
  Edward Dudlik
  Becoming Digital
  www.becomingdigital.com
 
 
  - Original Message -
  From: Steve B. [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, 09 June, 2003 19:29
  Subject: [PHP-DB] how to update field without using UPDATE query?
 
 
  how to update field without using UPDATE query?
 
  I open the db at a certain ID then set
  $dbrec['field'] = new value
  How do you update the db?
  Thanks
  -steve
 
 
 
  -
  Do you Yahoo!?
  Free online calendar with sync to Outlook(TM).
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 __
 Do you Yahoo!?
 Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
 http://calendar.yahoo.com

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




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



[PHP-DB] Re: sqlconnect garbage while connecting with db2

2003-06-17 Thread Robert Bedell
Ok, I put in the environment variables

LIBPATH=/home/db2/sqllib/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/db2/sqllib/lib

VWSPATH=/home/db2/sqllib

VWS_LOGGING=/home/db2/sqllib/logging

VWS_TEMPLATES=/home/db2/sqllib/templates

DB2INSTANCE=db2

(basically, I ran the ~db/sqllib/db2profile command - duh)

And it got rid of the garbage. Hope this helps someone with that.



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



[PHP-DB] updateable cursors in db2 via odbc_exec call?

2003-06-17 Thread Robert Bedell
I've noticed that the odbc_exec call appears to call SELECT statements as
updateable in db2.  Is there then a way to update each row of the response
(an updateable cursor)?

Any thoughts would be appreciated.

thanks

Rob



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



[PHP-DB] Re: MySQL Extention in PHP5.0.0b2-dev

2003-07-07 Thread Robert Schmelzer
Hi!

Check, if the libMySQL.dll is in a directory, where it can be loaded.

For example, add the c:\php5\dlls directory to your path variable.

This is because, php_mysql.dll loads the libMySQL.dll.

greetings
Robert


Adam Lundrigan [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 Apache 2.0.46 (Win32) PHP/5.0.0b2-dev w/ MySQL 4.1.0

 I have a question about the mySQL extension in the aforementioned version
of
 PHP
 Whenever I try to load the extension thru adding it to PHP.INI like so I
get
 an error

 extension_dir = C:\Servers\PHP\extensions
 .
 .
 .
 extension = php_gd2.dll
 extension = php_mysql.dll



 The error says that C:\Servers\PHP\extensions\php_mysql.dll could not be
 loaded.  However, it doesn't give the same error for php_gd2.dll, it loads
 fine.
 When I change the extension_dir to the wrong directory, it gives me errors
 for both DLLs.  When the directory is right, I still get the error for the
 mysql extension

 Any Ideas?

 Thanks.
 Adam Lundrigan





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



Re: [PHP-DB] PHP/ODBC/Apache/Netware/Foxpro Problem

2003-07-14 Thread Robert Twitty
What is the setting of the ODBC connect string parameter SOURCEDB?
Does the PC running Apache have permission to access the path
specified by SOURCEDB?

-- bob

On Mon, 14 Jul 2003, YT Lee wrote:

 I have a Windows XP PC configured as follow:

 1. Apache 2.0.46
 2. PHP 4.3.2
 3. Microsoft Visual Foxpro ODBC Driver

 The PC is connected to a Netware 3.2 server. The database
 are implemented as Foxpro 2.6 free tables on the Netware server.
 The PC is connected to the server via Netware client
 version 4.83 SP1E.

 Using WinSQL Lite, I can access the Foxpro tables on the
 Netware server from the PC through ODBC.

 Using PHP command line mode, I can also execute the following
 PHP script on the PC without problems:

 --- fp.php ---
 ?php


 $link = odbc_connect ('foxtest', '', '', 0)
 or die (Could not connect);

 print (Connected successfully to foxtest);

 $result = odbc_exec($link, SELECT * FROM SVCCAR);

 if (!$result) {
 echo odbc_error();
 exit;
 }

 odbc_close ($link);

 ?

 -- fp.php 

 However, when I try to run the same script from Apache using
 a browser, an error occurs and the output is as follow:

 --- output ---
 Connected successfully to foxtest
 Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]File 'svccar.dbf'
 does not exist., SQL state S0002 in SQLExecDirect in C:\htdocs\php\FP.PHP on
 line 9
 S0002
  output ---

 It appears that PHP is able to connect to the ODBC but
 it is not able to see any tables on the Netware disk.

 If I move the Foxpro files to the PC's hard disk, the script
 runs fine.

 Any assistance is highly appreciated.



 --
 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] Access 95 ODBC Annoyance

2003-07-17 Thread Robert Twitty
If the other application opens the database exclusively, then you will not
be able to open it, even for read only.  The only solution to modify the
sharing option used by the other application.  Another problem you may
encounter is that the ODBC driver for Access is not thread safe.

-- bob

On Thu, 17 Jul 2003, J. Michael Roberts wrote:

 I'll be the first to admit this is a rather backwards system and prone to be
 illogical, but it's what was handed to me and I can't do much about that.

 I've got an ancient Access 95 database that I've linked to via another A95
 database which is queried via ODBC. It was done this way because I'm not
 allowed to touch the first database due to the insane way they replace the
 data each week. (i.e.: any of my tables would be gone, so I need to keep
 'my' data safe and link to 'their' data)

 While under development, I was working with a copy of the database and got
 everything to work fine. In order to go live with the current data, I had
 to go into 'my' database and update the linked tables.  When this was done,
 my interface failed miserably and returned the following message:

 Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft
 Jet database engine cannot open the file 'T:\TS\Te_rdata.mdb'. It is already
 opened exclusively by another user, or you need permission to view its
 data., SQL state S1000 in SQLExecDirect in
 C:\Apache2\htdocs\projecthours\deptjobs.php on line 44

 Now it gets worse: I need to be able to access the data even if someone has
 it open. Read-only access isn't a problem...because that's all this
 particular interface does...but I just keep getting denied. Any ideas?

 Suffering under a backwards system,
 --JMR

 PS - Access is a hunk of crap...especially Access 95.




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



Re: [PHP-DB] ODBC Database

2003-08-11 Thread Robert Twitty
Unless I am mistaken, but isn't there an ODBC driver available for MySQL
called MyODBC?

-- bob

On Sun, 10 Aug 2003, Gerard Samuel wrote:

 Larry E.Ullman wrote:

  Im looking at venturing into working with PHP's ODBC extention.
  Does anyone have any recommendations as to a Database, that is easy to
  understand/get into from a novice point of view, that installs on
  windows 2k,
  and is free?
 
 
  MySQL is kind of free, installs on W2K and is easy to use but it
  doesn't require PHP's ODBC extension since PHP already has a good
  MySQL extension. If you really want to use ODBC and you have MS
  Office, you could try Access.

 What Im doing is seeing if my code will run on different databases.
 Of which it currently runs on mySQL, PostgreSQL and MSSQL.
 As soon as I can get PHP5 installed Ill be checking out SQLLite.
 But in the meantime, Im looking for a database that would interface with
 ODBC.
 I just downloaded IBM's DB2 Personal Edition, to see what I can do
 there, but,
 Im just looking for advice etc from others who went down this road.

 Thanks


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

2003-08-11 Thread Robert Twitty
This is true if Shaun was using MySQL, but he is using MSSQL.  MSSQL
allowas you to declare char and varchar fields with lengths up to 8000
characters.  Unfortunately the extension bundled with PHP cannot read
beyond the first 255 characters.  This is primarily due to the fact that
the extension was built using DB-LIB, which does not adequately support
all of the new data types introduced in MSSQL 7.0 and 2000.

-- bob

On Mon, 11 Aug 2003, Matthew McNicol wrote:


 Shaun, the MySQL manual suggests that you have hit your limit using the
 VARCHAR field type (255 characters). To store 6,000 characters have you not
 considered using the TEXT field type?



 6.2.3.1 The CHAR and VARCHAR Types
 The CHAR and VARCHAR types are similar, but differ in the way they are
 stored and retrieved.

 The length of a CHAR column is fixed to the length that you declare when you
 create the table. The length can be any value between 1 and 255. (As of
 MySQL Version 3.23, the length of CHAR may be 0 to 255.) When CHAR values
 are stored, they are right-padded with spaces to the specified length. When
 CHAR values are retrieved, trailing spaces are removed.

 Values in VARCHAR columns are variable-length strings. You can declare a
 VARCHAR column to be any length between 1 and 255, just as for CHAR columns.
 However, in contrast to CHAR, VARCHAR values are stored using only as many
 characters as are needed, plus one byte to record the length. Values are not
 padded; instead, trailing spaces are removed when values are stored. (This
 space removal differs from the SQL-99 specification.) No case conversion
 takes place during storage or retrieval.

 If you assign a value to a CHAR or VARCHAR column that exceeds the column's
 maximum length, the value is truncated to fit.



 - Original Message -
 From: Shaun Bentley [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, August 11, 2003 11:23 AM
 Subject: [PHP-DB] PHP  MSSQL


  Hi
  I am currently trying to use PHP and MSSQL together but I am having a
  few problems.
 
  I can enter data into the Db OK, but when pulling the data back to display
  on the page, the string cuts to around 250 chars. The Db field is VarChar
  6000 and I can see the whole data in the field.
 
  I have tried pulling the data out as object, array  row but always lose
 the
  end.
 
  Any help please!
 
  Shaun
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.506 / Virus Database: 303 - Release Date: 01/08/2003


 --
 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] Re: PHP MSSQL

2003-08-14 Thread Robert Twitty
I believe this is only applicable to fields of type text.  It may have
no effect on varchar(255) fields.  The purpose of this statement is to
limit the amount of memory allocated by the driver for text data. If it is
not specified, the driver will try to allocate 2GB of memory.  The
extension sets this value to 4096 by default.

-- bob

On Mon, 11 Aug 2003 [EMAIL PROTECTED] wrote:


 personally, i had luck with the statement below, but have sent it to others
 in the past and they had varying results.  but give this a shot at the top
 of your page that your PHP code is running on.


 mssql_query(set textsize 65536);

 hth
 Jeff



   Adam Presley
   [EMAIL PROTECTED]To:   [EMAIL PROTECTED]
   m   cc:
Subject:  [PHP-DB] Re: PHP  MSSQL
   08/11/2003 10:26
   AM






 I know what you're going through here. In MS SQL you can define a VARCHAR
 up
 to about 8000 characters, but your PHP mssql_query command only returns 255
 (0 - 254) characters. I then tried using the TEXT datatype. TEXT datatype
 in
 MS SQL allows somewhere around 2 billion characters. However, the PHP
 mssql_query command only returns 4096 characters every time. This appear to
 be a limitation of the PHP MSSQL commands.


 Shaun Bentley [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi
  I am currently trying to use PHP and MSSQL together but I am having a
  few problems.
 
  I can enter data into the Db OK, but when pulling the data back to
 display
  on the page, the string cuts to around 250 chars. The Db field is VarChar
  6000 and I can see the whole data in the field.
 
  I have tried pulling the data out as object, array  row but always lose
 the
  end.
 
  Any help please!
 
  Shaun
 
 



 --
 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] Query runs fine on Console but not in PHP

2003-08-18 Thread Robert Twitty
What platform are you using?  Since it appears that the script is
crashing, you are probably on Linux or some other UNIX flavor.  If this is
the case, the TDS protocol setting may not be correct.  What type of date
are you retrieving with this stored procedure?

-- bob

On Sun, 17 Aug 2003, vish.kohli wrote:

 Hi,

 I am trying to execute a stored procedure in PHP via mssql_query ()
 function. I pass 8 parameters to it.
 The query runs fine in SQL Query Analyzer but when I run it thru PHP, it
 behaves strangely. I can get number of rows (mssql_num_rows()) and number of
 fields (mssql_num_fields()) in PHP, but when I try to execute
 mssql_fetch_object() or mssql_fetch_array() on the same result identifier, I
 get a Page could not be displayed (standard internet error page).

 Please help.
 Thanks in advance.



 --
 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] Mcrosoft SQL Server and for xml auto queries

2003-08-19 Thread Robert Twitty
The win32 version of the mssql extension does not support the FOR
XML clause because it sends the results using ntext, which is the new
UNICODE text type introduced in SQL Server 7.0.

The mssql extension was built with DB-Library, which cannot read ntext
fields.  DB-Library is obsolete, and Microsoft has no desire to enhance or
fix it.

-- bob

On Mon, 18 Aug 2003, Daniel Cher wrote:

 I've been trying for months to figure out how to get for xml auto queries
 to work from PHP. I've got it working from ASP, which I strongly disprefer
 (hate!).

 I'd simply like to do:

 $sql = select * from customers for xml auto;
 $xml = $mssql-execute($sql);
 echo $xml

 This should return:

 root
customer id=1 name=Alfred Futt/
customer id=2 etc./
 /root

 Any help appreciated.

 Daniel



 --
 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] Query runs fine on Console but not in PHP

2003-08-20 Thread Robert Twitty
First FreeTDS should have built support for TDS protocol version 8.0.
The tds protocol version should also be set to 8.0 in interface file.
Details about this is included with the FreeTDS source distribution.

-- bob

On Mon, 18 Aug 2003, vish.kohli wrote:

 Thanks for your response.
 My script is running on Linux. I am trying to retrieve simple data such as
 text and numbers.
 I am not sure what the TDS protocol setting should be. What are the typical
 settings and how can I check it?

 Would appreciate any tips for debugging.

 Thanks.

 - Original Message -
 From: Robert Twitty [EMAIL PROTECTED]
 To: vish.kohli [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, August 18, 2003 8:28 AM
 Subject: Re: [PHP-DB] Query runs fine on Console but not in PHP


  What platform are you using?  Since it appears that the script is
  crashing, you are probably on Linux or some other UNIX flavor.  If this is
  the case, the TDS protocol setting may not be correct.  What type of date
  are you retrieving with this stored procedure?
 
  -- bob
 
  On Sun, 17 Aug 2003, vish.kohli wrote:
 
   Hi,
  
   I am trying to execute a stored procedure in PHP via mssql_query ()
   function. I pass 8 parameters to it.
   The query runs fine in SQL Query Analyzer but when I run it thru PHP, it
   behaves strangely. I can get number of rows (mssql_num_rows()) and
 number of
   fields (mssql_num_fields()) in PHP, but when I try to execute
   mssql_fetch_object() or mssql_fetch_array() on the same result
 identifier, I
   get a Page could not be displayed (standard internet error page).
  
   Please help.
   Thanks in advance.
  
  
  
   --
   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] MSSQL2000 and PHP

2003-09-02 Thread Robert Twitty
Yes

You cannot read varchar(255) data fields.

You cannot easily read ntext and nvarchar (UNICODE) fields.

No direct support for stored procedures.

-- bob

On Mon, 1 Sep 2003, Arnaud L wrote:

 Hi,

 We have migrate our SQL server to MSSQL2000.
 Since this migration, we can't connect to MSSQL using PHP (on linux with
 SybaseCT librairie)

 Any Issues ?

 --
 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] Re: PHP connection to remote Access database on NT

2003-09-12 Thread Robert Twitty
You cannot use FreeTDS to connect to an Access database.  You also cannot
use odbc on Linux either.  The only way to connect to an Access database
from Linux is with something like EasySoft's ODBC-ODBC bridge or ODBTP.

-- bob

On Thu, 11 Sep 2003, nabil wrote:

 Yes , and I done myself to mssql on windows from linux/apache

 you have to use odbc .. use FreeTDS , it is free and open soured... and work
 like a charm

 Nabil


 John Almberg [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Here's a question I hoped I'd never have to ask...
 
  Is it possible for PHP, running on a Linux/Apache webserver, to connect
  to an Access database running on a remote NT box? The NT box is a back
  office server behind a firewall.
 
  In a nutshell, the customer wants his website to be able to record
  on-line sales in his Access-based Point of Sale system. The POS system
  will be running simultaneously.
 
  I haven't done much work with Access, but my impression is that it locks
  tables and there might be some difficulties sharing write access to the
  data, but I could be wrong about this.
 
  Is there any way Access can be stretched to do this kind of thing?
 
  Thanks.
 
  -- John

 --
 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] HELP-PHP install

2003-10-01 Thread Robert Hennig


Jason Wong wrote:

On Wednesday 01 October 2003 01:39, Balazs Nemeth wrote:

  

cd /apache/apache-xxx
./configure --prefix=/www
cd /php/php-xxx
./configure --with-mysql --with-apache=/apache/apache-xxx
--enable-track-vars
make
make install
cd /apache/apache-xxx
./configure --activate-module=src/modules/php4/libphp4.a
make
make install

cd /php/php-xxx
cp php.ini-dist /usr/local/lib/php.ini

Then I edited the httpd.conf:

AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
User=www
Group=www(of course, the user and the group were created with the useradd
www and groupadd www commands previously)



Check that httpd.conf contains these lines:

LoadModule php4_modulelibexec/libphp4.so

AddModule mod_php4.c

If not, add those lines -- placing them at the end of their respective groups.
  

Also there has the php Mime-Type to be set:

AddType application/x-httpd-php .php


  

Here I started the apache(./apachectl start) which worked properly.



Check the apache error log to see whether that gives any clues.

  


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



Re: [PHP-DB] ODBC to MSSQL on FreeBSD for PHP

2003-10-09 Thread Robert Twitty
You should use the mssql extension for this purpose.  Another alternative
is odbtp.

-- bob

On Thu, 9 Oct 2003, rick rice wrote:

 What do I need and where can I get it?

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

2003-10-15 Thread Robert Twitty
Take a look at ODBTP, which is located at http://odbtp.sourceforge.net.
ODBTP allows you to remotely connect to Win32-based ODBC from any machine,
including Linux/UNIX.

-- bob

On Wed, 15 Oct 2003, Ricardo C. Fernandez de C. wrote:

 Hi,
 The sad part is that there is 0 documentation about how to connect to
 remote ODBC DSN, or a detailed structure of how to connect to it besides
 the odbc_connect(dsn,user,password), DSN could be string that tells the
 function where is the dsn, what database, what driver... but is not
 documented. I guess i will just read the file with the dbase funtions
 and convert it to psql, its not going to be real time, but oh well,
 thanks for the help.

 On Wed, 2003-10-15 at 04:07, Michael.J.Bourke wrote:
  I think you will have to create a DSN on each machine you use to serve PHP
  pages.
  Otherwise, you might want to look into using DSN-less connections instead.
 
  -Original Message-
  From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
  Sent: 14 October 2003 16:22
  To: php-db
  Subject: RE: [PHP-DB] ODBC
 
 
  Ok, it worked on the local machine if i do
 
  odbc_connect(telefonia,,)
 
  But, if i'm on the remote machine, i have a problem, the DSN will not
  query a Database at all, it will query 3 Fox Pro Tables, what query
  should i use then? any idea?
 
  thanks for the help :)
 
  On Tue, 2003-10-14 at 10:21, Michael.J.Bourke wrote:
   odbc_connect requires three parameters: you have specified just one.  PHP
   takes the string between the pairs of double-quotes to be just one
   parameter.  You will also need to specify a username and password for
  access
   to the DB.  Assuming you have none, try this:
  
   $conn=odbc_connect(Driver={Microsoft Fox Pro Driver};Server=
   127.0.0.1;Database=telefonia,,);
  
   -Original Message-
   From: Ricardo C. Fernandez de C. [mailto:[EMAIL PROTECTED]
   Sent: 14 October 2003 15:16
   To: [EMAIL PROTECTED]
   Subject: [PHP-DB] ODBC
  
  
   Hi all,
  
   I have been trying to connect to a windows ODBC controller with PHP, and
   after reading some of the documentation, I can't make the connection
  
   This is the Code I'm using:
  
   ?
   $conn=odbc_connect(Driver={Microsoft Fox Pro Driver};Server=
   127.0.0.1;Database=telefonia,,);
   if(!$conn) { echo Not connected; }
   ?
  
   And i get this Warning Message:
  
   Warning: Wrong Parameter count for odbc_connect in
   c:\apache2\htdocs\od_connect.php on line 2
  
   And of course the Not Connected echo message.
  
   Any idea why is this? any good document I can read about PHP-ODBC (ODBC
   in Windows) besides the official Documentation? any other idea?
  
   Thanks,
  
   c'ya
   --
   Ricardo C. Fernández de C.
   Fundabit - Min. de Educación, Cultura y Deporte.
   Caracas/Venezuela
  --
  Ricardo C. Fernández de C.
  Fundabit - Min. de Educación, Cultura y Deporte.
  Caracas/Venezuela
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 --
 Ricardo C. Fernández de C.
 Fundabit - Min. de Educación, Cultura y Deporte.
 Caracas/Venezuela

 --
 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] ODBTP - ODBC - FOXPRO.

2003-10-17 Thread Robert Twitty
Setting SourceDB=c:\telefonia\; instead of
SourceDB=c:\telefonia\CDTCTL01.DBF; solved the problem.

-- bob

 Warning: [S1000][1][Microsoft][ODBC Visual FoxPro Driver]Fox Error 1
 [IM006][0][Microsoft][Administrador de controladores ODBC] Error de
 SQLSetConnectAttr del controlador in
 /var/www/telefonia/registro/prueba_odbtp.php on line 2

 ?
 $link = odbtp_connect('172.16.4.106','Driver={Microsoft Visual FoxPro
 Driver};SourceDB=c:\telefonia\CDTCTL01.DBF;SourceType=DBF');
 ?

 thanks for the help, and thanks for the program is a great software, i
 hope i can make it work with FoxPro :)

 c'ya!

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



[PHP-DB] Multiple adds?

2003-10-21 Thread Robert Sossomon
I am working on a quote system and have been trying to figure out how to
make them system automatically add an entire vendor or category at one
time.  I can make the system display all of them and give the sales
folks in my office a chance to change the price, however if I have just
one Add button it will ONLY add the first item in the group, not the
entire group.

Has anyone come up with a way to do something like this?

Thanks,
Robert

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



RE: [PHP-DB] Multiple adds?

2003-10-21 Thread Robert Sossomon
An example is:
http://www.garlandcnorris.com/quotes/seestore.php

I have a session tracker installed on it already, but the modifying the
information (instead of remove and readding it) and adding an entire
group are pieces I am stumbling on.

TIA!

~~~
I've been writing a book.  I've got the page numbers done. 

-Steven Wright 
~~~

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 2:11 PM
To: Robert Sossomon; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Multiple adds?


From: Robert Sossomon [EMAIL PROTECTED]

 I am working on a quote system and have been trying to figure out how 
 to make them system automatically add an entire vendor or category at 
 one time.  I can make the system display all of them and give the 
 sales folks in my office a chance to change the price, however if I 
 have just one Add button it will ONLY add the first item in the 
 group, not the entire group.

Can you give an example page to help with your explanation? I kind of
understand what you want, but without seeing what you're doing and what
point your at, it's hard to help.

---John Holmes...

-- 
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] Multiple adds?

2003-10-21 Thread Robert Sossomon
BOTH would be wonderful.

But for right now I could handle just the multiple adds.  I don't figure
they would be able to mess up too many that they will have to go back
and modify more then 1 or 2, but right now the majority of the quotes
are for an entire vendor or category, so adding the whole thing would be
killer.



~~~
Truth is always exciting.  Speak it, then,  Life is dull without it.

-Pearl Buck. 
~~~

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 2:39 PM
To: Robert Sossomon; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Multiple adds?


From: Robert Sossomon [EMAIL PROTECTED]


 An example is: http://www.garlandcnorris.com/quotes/seestore.php

 I have a session tracker installed on it already, but the modifying 
 the information (instead of remove and readding it) and adding an 
 entire group are pieces I am stumbling on.

So you want to be able to add multiple items into your cart at one time?
Or be able to edit multiple items at a time?

---John Holmes...

-- 
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] Re: using href=abc.php/?day=......

2003-10-21 Thread Robert Sossomon
Where are you getting the PHP variable from, another page, or ???

I use the print function in my scripts, mainly have the script write
everything to one big variable and then printing the variable.  By using
this method I can code the pieces in the big variable and they all come
out nice and pretty when displaying the page.

Do you have some code I can look at and maybe see where things can be
modded to work for you?

Robert

-Original Message-
From: Gabriel Peugnet [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 2:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: using href=abc.php/?day=..


It's just the syntax:

1. Don't use the / after .php:
a href=abc.php?day=
2. Don't use echo inside the string:
a href='abc.php?day=$start_day'/a
3. Check the use of double and single quotes.

If you use:
echo a href='abc.php?day=$start_day'abc/a;
maybe you will get the link you want.

Gabriel.


MüCella Erdem Efe [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Hi;

 I need to use a href=abc.php/?day=..  /a  statement in a
xxx.php
 file.

 I have to use a php  variable on the right of the day variable  like 
 a href=abc.php/?day=+?echo $start_day;? /a. When i get this 
 variable in abc.php file

 if (phpversion() = 4.1.0)
  { $vars = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS); }  else { 
 $vars = $_REQUEST; }  print_r($vars);

 Output is
 Array ( [day] =(nothing)

 When i use a constant instead of  variable like a 
 href=abc.php/?day=12-12-2002/a.
 it works .

 Please help me about using a php variable in a href statement.

 thanks for your attention.

-- 
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] Re: using href=abc.php/?day=......

2003-10-21 Thread Robert Sossomon
Sorry, I was over thinking...

Just modify it by removing the echo and the / and it should code right
out for you.

 a href=abc.php/?day=+?echo $start_day;? /a

BECOMES:

a href=abc.php?day=$start_day  /a

Robert

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



[PHP-DB] Re: [PHP] php|cruise - do unto others...

2003-10-20 Thread Robert Cummings
On Mon, 2003-10-20 at 15:54, Larry E.Ullman wrote:
  To make a donation, simply login to PayPal and click the Send Money 
  tab at the top of your screen.  Once there, put 
  [EMAIL PROTECTED] in the Recipient's Email field and fill 
  out the remaining fields to your liking. :)
 
 Even though this thread is much more PHP-related than many of the 
 topics discussed here (sadly), could it be taken off list, please? Cpt 
 Holmes is certainly a valuable asset to these lists but the time 
 everyone spends reading two emails (PHP General and PHP-DB) every time 
 someone does or does not donate to the cause is time better spent 
 earning money for the cause, no?
 
 Not trying to be cranky, just worried that the 16 emails I've already 
 seen in the past hour may not be the end of it!
 Larry

Anyone got a double rot13 decoder for the above message? ;)

Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP-DB] Re: using href=abc.php/?day=......

2003-10-22 Thread Robert Sossomon
Right,  sorry I left that part out because it basically depends on what
you are doing..

/***  Test Page  ***/
?php

$start_day = date;
$end_day = date2;

$display_block = a href=\abc.php?day=$start_day\  /abr;
$display_block .= a href=\abc.php?day=$end_day\  /abr;
?

htmlbody
 ? print $display_block; ?
/body/html

~~~
I get mail I exist. 
~~~

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Wednesday, October 22, 2003 4:50 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: using href=abc.php/?day=..


BECOMES:

a href=abc.php?day=$start_day  /a

This works only if it's within an echo statement:

echo a href='abc.php?day=$start_day';

and you must make sure to either use single quotes around the 
href link, or else escape the double quotes with a backslash:

echo a href=\abc.php?day=$start_day\;

Alternatively, you can do it this way:

a href=abc.php?day=? echo $start_day; ?

(ie embed the echo within a regular HTML tag)

-Lisi

___
Sent by ePrompter, the premier email notification software. Free
download at http://www.ePrompter.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



  1   2   3   >