Re: [PHP-DB] Php, Oracle on Mac, with strange behaviour

2009-03-16 Thread Grant Croker

On/El 16/03/09 09:23, chris smith wrote/escribió:

On Mon, Mar 16, 2009 at 6:51 PM, Mark Halling-Brown
mhallingbr...@icr.ac.uk  wrote:
   

Thanks for your replies.
In my desperation, I declared those environment variables in as many places
as I could think of. The script (Although I know I shouldnt), php.ini and
also the apache httpd.conf file:

SetEnv ORACLE_HOME /opt/oracle/instanceclient
SetEnv DYLD_LIBRARY_PATH /opt/oracle/instanceclient
SetEnv LD_LIBRARY_PATH /opt/oracle/instanceclient
SetEnv ORACLE_BASE /opt/oracle/instanceclient

But given that it works on the command line, but not through the browser, I
think that the environment variables must be set correctly.
 


Did you restart apache after doing this?

The env variables are set correctly for your user, but not apache's
(which is the problem).

   
Does the mac have an /etc/environment file? That should cover all users.


Unfortunately not although with the stock/supplied Apache web server 
there is a plist file you can edit to add environment settings. Edit 
|/System/Library/LaunchDaemons/org.apache.httpd.plist, adding the 
relevant environment variable key/value information:|


?xml version=1.0 encoding=UTF-8?
!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN 
http://www.apple.com/DTDs/PropertyList-1.0.dtd;

plist version=1.0
dict
keyEnvironmentVariables/key
dict
keyDYLD_LIBRARY_PATH/key
stringpath goes here/string
keyORACLE_HOME/key
stringpath goes here/string
keyORACLE_BASE/key
stringpath goes here/string
/dict
keyLabel/key
stringorg.apache.httpd/string
.
.
.
/dict
/plist


Then you use PassEnv in Apache to pass these values through to PHP. The 
SetEnv directive in Apache is not the same as setenv or export in 
csh/bash/etc. Apache maintains its own symbol table for environment 
variables. Unless the OCI8 extension calls apache_getenv those 
declarations will have no effect.


regards

grant

--
Grant Croker - Ingres PHP and Ruby maintainer
http://blogs.planetingres.org/grant
Generally, old media don't die. They just have to grow old gracefully.
Guess what, we still have stone masons. They haven't been the primary
purveyors of the written word for a while now of course, but they still
have a role because you wouldn't want a TV screen on your headstone.


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



Re: [PHP-DB] Php, Oracle on Mac, with strange behaviour

2009-03-16 Thread Grant Croker

Hi Mark,

you are right /System/Library/LaunchDaemons/org.apache.httpd.plist will 
not work in your case, it's for the Mac OS X supplied Apache. In your 
case you can edit /usr/local/apache2/bin/apachectl adding the following:


DYLD_LIBRARY_PATH=/opt/oracle/instanceclient
LD_LIBRARY_PATH=/opt/oracle/instanceclient
ORACLE_BASE=/opt/oracle/instanceclient
ORACLE_HOME=/opt/oracle/instanceclient
export DYLD_LIBRARY_PATH LD_LIBRARY_PATH ORACLE_BASE ORACLE_HOME

(note: As Chris Jones mentioned LD_LIBRARY_PATH is not used on OS X, 
however there is no harm in having it set)


Place the above some where near the top of apachectl, I cannot tell you 
exactly since fink will not install and MacPorts does not build SQLite3. 
Restart apache and you should see the correct values in getenv() or 
phpinfo().


regards

grant


On/El 16/03/09 12:13, Mark Halling-Brown wrote/escribió:

Hi Grant,

Thanks to your instructions, I am making a bit of progress.
I have entered the PassEnv commands into the https.conf.:
SetEnv DYLD_LIBRARY_PATH /opt/oracle/instanceclient
SetEnv LD_LIBRARY_PATH /opt/oracle/instanceclient
PassEnv DYLD_LIBRARY_PATH
PassEnv LD_LIBRARY_PATH

It now seems that this variable is passed through correctly, but it is 
not as I set it. Instead it states:

DYLD_LIBRARY_PATH: /usr/local/apache2/lib:

I restart apache as root user (sudo /usr/local/apache2/bin/apachectl 
restart) and it complains that:
[Mon Mar 16 11:08:53 2009] [warn] PassEnv variable LD_LIBRARY_PATH was 
undefined


 So I am guessing that root has not picked up any of 
the environment variables that I have set in various places around my 
system. I have put DYLD_LIBRARY_PATH in /etc/bashrc 
~/.bash_profileetc, but I still seems root doesn't know about them.


Have you any idea where I need to set these variables (Is there a root 
home directory I can edit a bash_profile or something?)


I did edit the /System/Library/LaunchDaemons/org.apache.httpd.plist 
file, but the apache I am using was compiled from source, so I fear it 
wont work list that plist?


Thanks for all your help
Mark




--
Grant Croker - Ingres PHP and Ruby maintainer
http://blogs.planetingres.org/grant
It was so much easier to blame it on Them. It was bleakly depressing to think 
that They were Us. If it was Them, then nothing was anyone's fault. If it was 
us, what did that make Me? After all, I'm one of Us. I must be. I've certainly 
never thought of myself as one of Them. No one ever thinks of themselves as one 
of Them. We're always one of Us. It's Them that do the bad things.
-- Terry Pratchett, Jingo



Re: [PHP-DB] Migrate MySQL to Ingres

2007-05-15 Thread Grant Croker

On 13/05/07 17:12, Jeffrey scribbled:
We have a moderately complex PHP web app collecting data from a MySQL 
database. We've been offered a rather attractive proposition to build 
an Ingres version (ie. same app, but collects data from an Ingres 
database).


Questions for experts like you:

1) Is this a reasonably straightforward migration in which we can 
largely replace mysql_query with ingres_query, etc, or will it be more 
complex than that?
There are different functions provided by both the Ingres and MySQL 
interfaces. That and the parameter order of equivalent functions  do not 
always match.


2) Does Ingres compare reasonably well with MySQL in terms of 
scalability and speed?
Yes and then some - don't just take my word for it since I work for 
Ingres. If you wish to get the opinion of Ingres users go to 
comp.databases.ingres 
(http://groups.google.com/group/comp.databases.ingres/topics) or 
Ingres's own forums (http://community.ingres.com/)


3) Any dangers I should be aware of?

none that I am aware of.
I am trying to decide whether or not to go forward with this project. 
Your advice is much appreciated!

Feel free to contact me directly if you have any further questions

regards

grant
Ingres PECL maintainer

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



[PHP-DB] Help displaying Column Names

2006-09-14 Thread Grant Griffith
Hello All,

 

I am fairly new to PHP but have coded in asp and asp.net for years.  I
am trying to find the code that will allow me to display the name of the
column's from the table I am using.  Below is the code where I am
writing all the data out in a comma delimited fashion, but I want to
make the very first row show the name of the database table names.  For
example I want to show the ID,Name,Address, etc...

 

Can someone tell me what that command is in PHP?  I have searched and
can not find anything, I guess I am searching for the wrong info as I
know it can be done!!!

 

code snippet

$sel_result = mysql_query(select * from customerdata where account_type
= '$tmpType',$db);

 

//Now loop thru account types and show the one selected

while($sel_row=mysql_fetch_array($sel_result))

  {

  print
\$sel_row[0]\,\$sel_row[1]\,\$sel_row[2]\,\$sel_row[3]\,\$sel_
row[4]\,\$sel_row[5]\,\$sel_row[6]\,\$sel_row[7]\,\$sel_row[8]\
,\$sel_row[9]\,;

  print
\$sel_row[10]\,\$sel_row[11]\,\$sel_row[12]\,\$sel_row[13]\,\$
sel_row[14]\,\$sel_row[15]\,\$sel_row[16]\,\$sel_row[17]\,\$sel_
row[18]\,\$sel_row[19]\,;

  print
\$sel_row[20]\,\$sel_row[21]\,\$sel_row[22]\,\$sel_row[23]\,\$
sel_row[24]\,\$sel_row[25]\,\$sel_row[26]\,\$sel_row[27]\\n;

  }

/codesnippet

 

Thanks,

Grant Griffith

Web Application Developer

Enhanced Telecommunications

http://www.etczone.com

812-932-1000

 



Re: [PHP-DB] Character encoding issues: Pound-sign

2005-12-13 Thread Grant Croker


-Original Message-
 From: Alex Gemmell [EMAIL PROTECTED]
 Date: 13/12/2005 14:07

 Hello,

Hi

 I'm experiencing some odd character encoding issues.  My PHP webpage is 
 displaying test from a MySQL database.  What happens is that I export 
 data from an SQL Server database to a MySQL (4.0) database.  Somewhere 
 along the line the British currency pound-sign £ becomes a ú (u with 
 somesort of accent on it!).  I cannot figure out why this is happening 
 and what to do about it.

 I could use a PHP routine to find-and-replace the chars but surely there 
   is a way to tackle the root problem?

Not really, SQL Server uses a Windows Code page to store its characters and I
guess MySQL server uses a DOS code page. ASCII chars they will be compatible but
for extended characters there will be mis-matches. The £ is one such
mis-match, the € will be another. I cannot remember what a DOS £ looks like
in Windows. You will have to search and replace all ú for £ in your data
load scripts. 

 Any ideas gang?



-- 
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] bags o beans - filtering rows/array by value of an aggregated attribute

2004-08-05 Thread Grant Listhandle
In the database beans i have a table bags_o_beans where each row
represents a single bag, and columns named bean_type and number_o_beans

My teenage son is having several thousand hungry friends over in half an
hour, and I'm stuck making the bean dip...  I'm going to need 1 million
beans of a single type to make the dip.

My goal, before I start cooking, is to filter from the following query:

SELECT bean_type, sum(number_o_beans) FROM bags_o_beans GROUP BY bean_type

...into an html table such that only 'bean types' with
'sum(number_of_beans)' greater than 1 million are displayed.  I have tried
inserting the following snippet into the table-generating php code, with no
luck:


while ($row = @ mysql_fetch_row($result))
{
foreach($row as $data)
if ({sum(number_o_beans)}  (100))
print \n\ttd {$data} /td;
print \n/tr;
}


Thanks ahead of time for your thoughts and recipes :)
Grant

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



Re: [PHP-DB] another redirecting question

2003-05-31 Thread Grant Rutherford
I'm very new to PHP so somebody correct me please if this is a bad
idea...

I had the same problem and I ended up just including the second page at
the end of the first one:

?php 
// some stuff (output if necessary)

include 'nextpage.php';
die();
?

Grant


On Fri, 2003-05-30 at 09:43, Rick Dahl wrote:
 The scripts I need to run before I redirect automatically send output to the 
 browser.  I cannot alter these scripts.  Is there a way around this?
 
 Rick
-- 
Grant Rutherford
Iders Incorporated
600A Clifton Street
Winnipeg, MB Canada R3G 2X6
http://www.iders.ca
tel: 204-779-5400 ext 36
fax: 204-779-5444

This message is intended solely for the use of the designated
recipient(s) and their appointed delegates, and may contain
confidential information.  Any unauthorized disclosure,
copying or distribution of its contents is strictly prohibited.
If you have received this message in error, please destroy it
and advise the sender immediately by phone, email or facsimile.


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



Re: [PHP-DB] another redirecting question

2003-05-31 Thread Grant Rutherford
Hi

I did actually encounter that problem.  However, wouldn't redirecting
properly still allow the user to resubmit the information using the back
button?  I solved this problem a different way by setting and clearing
session variables on entry and exit to a series of pages.

Grant


On Fri, 2003-05-30 at 10:25, Metin Kale wrote:
 Well, if you're inserting some data into a database and the person 
 refreshes the page, it would re-insert the data again into the 
 database.  Including the page like you did at the end wouldn't change that 
 fundamental problem, hence why you'd want to have it redirect to another page.
 
 Metin
 
 At 10:20 AM 5/30/2003 -0500, Grant Rutherford wrote:
 I'm very new to PHP so somebody correct me please if this is a bad
 idea...
 
 I had the same problem and I ended up just including the second page at
 the end of the first one:
 
 ?php
 // some stuff (output if necessary)
 
 include 'nextpage.php';
 die();
 ?
 
 Grant
 
 
 On Fri, 2003-05-30 at 09:43, Rick Dahl wrote:
   The scripts I need to run before I redirect automatically send output 
  to the browser.  I cannot alter these scripts.  Is there a way around this?
  
   Rick
 --
 Grant Rutherford
 Iders Incorporated
 600A Clifton Street
 Winnipeg, MB Canada R3G 2X6
 http://www.iders.ca
 tel: 204-779-5400 ext 36
 fax: 204-779-5444
 
 This message is intended solely for the use of the designated
 recipient(s) and their appointed delegates, and may contain
 confidential information.  Any unauthorized disclosure,
 copying or distribution of its contents is strictly prohibited.
 If you have received this message in error, please destroy it
 and advise the sender immediately by phone, email or facsimile.
 
 
 --
 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] ms sql limit equivalence

2003-01-24 Thread Grant, Dean (OIT)
Thanks! I was going to write and say that I have been using ADODB but was
unable to make the SelectLimit function work using MS SQL, but I decided to
take a look at my setup one more time.  I have setup my own abstraction
layer on top of ADODB so that I can override some of the default functions
and or adjust them as need be, but it appears that when I wrote the
interface to the SelectLimit function I neglected to send the $nrows and
$offset values to ADODB.  It is now fixed and working nicely.  Thanks again
for the advice.

Dean
-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 8:21 PM
To: Grant, Dean (OIT); [EMAIL PROTECTED]
Subject: RE: [PHP-DB] ms sql limit equivalence

 I am just joining this list so if this has been covered in the past I
 apologize.  I am working with MS SQL and would like the functionality
that
 MySQL's limit function provides.  I understand that MS SQL has no such
 command or equivalent. Has someone found a way to use standard (or MS
SQL
 specific) SQL to achieve the same goal?  I have seen bits and pieces
of
 code
 and ideas here and there, but nothing seems to work.  Any advice would
be
 appreciated.

In addition to the TOP suggestions, you may want to check out some of
the Abstraction layers out there, i.e. PEAR or ADOdb. I'm pretty sure
they replicate the LIMIT function somehow. You can use one of those
programs or just take when they do and adapt to your needs.

---John W. Holmes...

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


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




[PHP-DB] ms sql limit equivalence

2003-01-23 Thread Grant, Dean (OIT)
Hi,
 
I am just joining this list so if this has been covered in the past I
apologize.  I am working with MS SQL and would like the functionality that
MySQL's limit function provides.  I understand that MS SQL has no such
command or equivalent. Has someone found a way to use standard (or MS SQL
specific) SQL to achieve the same goal?  I have seen bits and pieces of code
and ideas here and there, but nothing seems to work.  Any advice would be
appreciated.
 
Thanks,
 
Dean
 
Ps. If someone would like a table schema and brief example to work with:
 
Table table1 with columns a and b
 
Retrieve 5 entries from table1 sorted by a
Retrieve next 5 entries from table1 sorted by a




[PHP-DB] PHP/MySQL Problem....

2002-12-19 Thread Grant P. Kohler
Hello, 

I seem to have a problem getting my PHP to work with MySQL.
I have installed Redhat 7.3 on my system and I installed apache, php,
and mysql from the redhat install cd via the RPMS.  Now I know the PHP
works just fine normally, but when I start trying to use the MySQL
commands in my PHP pages to connect to the database I start getting
fatal errors like the following.

Fatal error: Call to undefined function: mysql_connect() in
/home/gkohler79/public_html/book1/chapter11/db_connect.php on line 3

and line 3 looks like this.

$connection = mysql_connect(localhost, mylogin, mypass) or die
(Couldn't connect.);

Also my php configure command looks like this..

 './configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr'
'--with-config-file-path=/etc' '--enable-force-cgi-redirect'
'--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl'
'--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf'
'--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp'
'--with-iconv' '--with-jpeg-dir=/usr' '--with-mm' '--with-openssl'
'--with-png' '--with-pspell' '--with-regex=system' '--with-xml'
'--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-bcmath' '--enable-debugger' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path'
'--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--without-oci8' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared'
'--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack'
'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath'
'--enable-shmop' '--enable-versioning' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--with-apxs=/usr/sbin/apxs'

 

Any help would be greatly appreciated.

-Grant

 

 

Grant P. Kohler

Technology Consultant

The Information Age, Inc.

[EMAIL PROTECTED]

770.838.0373

 




Re: [PHP-DB] Configure with Postgres/MySQL of different machine

2001-11-27 Thread Grant Johnson

The different machine has nothing to do with the config, and everything 
to do with the connect.  It is in the connect string that you specify 
which machine for PHP to connect to Postgres.

Joe Nelson wrote:

I'm trying to configure php so that it will have support for both MySQL
and Postgres.  Normally that would not be a problem, however, both MySQL
and Postgres will be on a different machine.  How can I configure PHP to
use the servers on the other machine?  Everything I've seen shows how to
do it when it's all on one machine.

This is what I ran:
./configure \
--enable-track-vars \
--with-gd \
--with-mysql \
--with-pgsql \
--with-apxs=/usr/sbin/apxs
--with-config-file-path=/etc

Any help or pointers would be appreciated.  Thanks.

Joe





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] PHP/MySQL to M$ Access

2001-11-15 Thread Grant Johnson

Access has to be running on a Winders machine.  At least the drivers. 
 Another option might be to migrate the data, and use ODBC and linked 
tables to let Access still work temporarily, but really have the data 
already transitioned.

Otherwise it is a weird linked ODBC bouncing off a Windows machine on 
the way to the data.

Chris Andrew wrote:

Hi,

Until we completely migrate an application from M$ Access to PHP/MySQL, I
need to figure out a way to temporarily query an Access DB from PHP/MySQL.

I am aware of this article on PHP Builder:
http://www.phpbuilder.com/columns/timuckun20001207.php3?page=1
which discusses using ODBC Socket Servers, but the article assumes the M$
Access db is on a winblows machine. In my case, the Access DB is on a Linux
machine (served thru' Samba - isn't Linux great...  :-)

Anyways - could someone offer me some advice - all I need is some some
simple SELECT queries on the Access tables.

Many Thanks,
Chris


Email: [EMAIL PROTECTED]
Web: www.oxspring.com





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Why use MySQL with PHP

2001-11-15 Thread Grant Johnson

I mostly agree, although I prefer PostgreSQL for the transactions, 
better row locking, and server side cursors.  It also does better with 
lotsa users (if the data isn't just used for the web, this is 
important).  I have used many languages for this stuff, and the one with 
the best balance of functionality, extensibility, and ease of use is PHP 
(I have used CF, ASP, Miva/HTMLScript, PERL, C, COBOL, Shell also)

BTW, COBOL on the web is weird.  ASP is the worst of them all.

Sheridan Saint-Michel wrote:

I use PHP/MySQL for a few reasons.

snip/snip


On the other hand, having to write in languages where you have strict types
(You want to treat a variable as an int and then as a string?!?!?!?) and
very structured design is just as distasteful to me.  PHP strikes a very
good balance between the two even when working with MySQL (I won't paste any
of the kludge needed to interface with CGI and DB in other languages... but
if you have some free time look some of these programs up).

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: file upload, again

2001-11-14 Thread Grant Johnson

Look in you apache.conf file and find out what user the web server runs 
as, then give that user the right to write to that directory, probably 
through a group used for nothing else is most secure.

Brian Mauter wrote:

To get around this, I made a small shell script which runs as root.  The php
page calls the script via the system call.  All the shell script does is
move a specific file from tmp to a specific location.

I'm probably asking for someone to exploit it, but I don't know exactly what
they can do.

-Brian





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] file upload, again

2001-11-13 Thread Grant Johnson

The web server user needs to have access to that directory.  On NT, 
there are 2 of these users.  On *nix, there is one.  Giving these users 
access to write to that directory is not a huge risk.

koelwebdesign wrote:

hi there,
I've searched the lists and forums for a couple of days now but nope...
when I upload a file all is well, it get stored in the tmp directory, the
filename and path get stored in the mysql database, however, it won't copy
to the desired directory unless I give everyone write permissions to that
directory. offcourse I don't like this.
How do I tell php to use my username and password when copying the file from
the tmp dir to the desired dir?
Do I really have to make an ftp connection first? or is there a more simple
way?
How do you upload all those pictures to the webserver?

thanks

Leo Kuiper
www.koelwebdesign.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-DB] Zend IDE anyone?

2001-08-24 Thread Grant Boggs

Does anyone use the Zend IDE for development?

My code is getting complicated enough that I need a step-execute capable
debugger.  Where I can set breakpoints, watches, etc.  The normal type stuff
with any other language's IDE.

Zend IDE looks to fill the gap.  Any other recommendations?

--
==
Grant Boggs
http://www.cornersonesoftware.ws



-- 
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: Installation problem w MySQL

2001-08-24 Thread Grant Boggs

George Pitcher [EMAIL PROTECTED] wrote in message
01e501c12c7d$e9c831f0$[EMAIL PROTECTED]">news:01e501c12c7d$e9c831f0$[EMAIL PROTECTED]...
 I'm trying to compile PHP 4.0.6 on LinuxPPC and I keep tripping over the
 MySQL part. It just won't compile (can't find headers during the MySQL
bit).

 All the documentation points to there being a /usr/local/mysql/ folder but
 after my MySQL install (rpm) I don't have such a folder. The nearest I
have
 is:

 /usr/bin/which seems to have all the client stuff;
 /usr/bin/include which has several files with '.h' extensions
(headers?)
 /var/lib/mysqlwhich has the server/engine stuff
 /usr/local/php-4.0.6/ext/libmysql/  which appears to have more '.h' files.

Do a

locate mysqld

And see what that pops up.  If you did it by rpm, mysql is probably in a
/etc/mysql  directory.

--
======
Grant Boggs
http://www.cornersonesoftware.ws



-- 
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: Zend IDE anyone?

2001-08-24 Thread Grant Boggs

Grant Boggs [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Does anyone use the Zend IDE for development?

 My code is getting complicated enough that I need a step-execute
capable
 debugger.  Where I can set breakpoints, watches, etc.  The normal type
stuff
 with any other language's IDE.

 Zend IDE looks to fill the gap.  Any other recommendations?

I guess I should also note that I'm using Red Hat 7.1, Apache, mySQL,
and PHP 4.0.6.

--
======
Grant Boggs
http://www.cornersonesoftware.ws




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] PHP development with PostgreSQL

2001-08-24 Thread grant

This does not sound like a MySQL problem, but more likely a poor indexes
problem.  PostgreSQL does scale bigger than MySQL (more users) but you are
probably nowhere near that limit.  When you have more than 25 concurrent
users (remember that the web server is probably only one or 2 unless it is
really getting slammed) then start thinking about switching.

__

  Your mouse has moved.
   You must restart Windows for your changes to take effect.

#!/usr/bin/perl
print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);



-- 
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: Zend IDE anyone?

2001-08-24 Thread Grant Boggs

Steve Brett [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have used the Zend IDE for php dev and found it to be superb.

 unfortunately the company i work for takes an age to get license
agreements
 arranged so our eval period had run out.

 it's very easy to set up - try the eval version first.

 Steve

Great!  Thanks!  I'm working on installing it now.

I'm a relative newbie to Linux, but it looks like because I use PHP with
Apache and mySQL, I have to recompile both of these products to get the Zend
debugger installed?

Recompiling now... heh

--
======
Grant Boggs
http://www.cornersonesoftware.ws



-- 
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: Zend IDE anyone?

2001-08-24 Thread Grant Boggs

Grant Boggs [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Steve Brett [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  no need to recompile.
 
  the debug server is a .so and only needs added lines php.ini

Woohoo!!!

I had a typo in my php.ini file!

Works like a charm.  Very cool.  I think this is what I might be
needing.  Was testing some stuff with it.  I like it so far!  Thanks for the
helpful pointers and saving me the headaches of recompiling!!!

--
======
Grant Boggs
http://www.cornersonesoftware.ws



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

2001-08-24 Thread Grant Boggs

Anyone use Komodo to do remote debugging?

I can't get the remote debugger feature to work.  I have Linux Red Hat
7.1, apache, php 4.0.6.

When I start Komodo IDE, and load a web-page in my browser, the Komodo
IDE never seems to get connected.  It just sits in the listening mode
indefinitely.  The web page loads as normal BAH!
--
==
Grant Boggs
http://www.cornersonesoftware.ws



-- 
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: Photo Album Schema

2001-08-23 Thread grant

The most useful schema would be to have the name of the document be system
generated, like i123456789.img and make the database as follows:

Image
Image_Name varchar(50) primary key
Original_Name varchar(50)
Description text

User
User_ID int8 primary key
Login char(8) uniques index
password varchar(50) encrypted

relation
User_ID
Image_Name

Now you have duplicate anems OK, multiple users associated with any
picture.  You just rename the file as it comes and goes.
__

  Your mouse has moved.
   You must restart Windows for your changes to take effect.

#!/usr/bin/perl
print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);



-- 
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] Uploading files problem

2001-08-22 Thread Ian Grant

Hi,

I have this code after a user submits a form with name, description and
image file upload fields:
images/people/preview is simply a unix link to /tmp/phptempimg-ian.grant

The problem is, when this script is run, the image show is that from the
previous operation. If you refresh the page, the correct image is displayed.

How can I fix this without refreshing the page?

--

if (is_uploaded_file($picture)) {
rename($picture, /tmp/phptempimg-ian.grant);
 }
 if ($picture!=none)

$picture=/tmp/phptempimg-ian.grant;$picture_src=images/people/preview; }
else { $picture_src=images/people/none.gif; }


 echo You are about to add the following member profile to the team
profiles database:brbr\n;

 echo  bName:/b $namebr\n;
 echo  bDescription:/b $descbr\n;
 echo  bPicture:/b img src=\$picture_src\ alt=\$name\
width=\110\ height=\121\br\n;

--




-- 
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] Access tables to PostgreSQL

2001-08-22 Thread grant

On Wed, 22 Aug 2001, Tim O'Brien wrote:

 What is the best method to move data from access tables to postgreSQL?

 Are there are php functions that are available?

Unfortunately, only Access reads Access very well, but you can use ODBC
and linked tables in Access to copy it to PostgreSQL.


-- 
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] Getting key of row just inserted into mySQL

2001-08-22 Thread Grant Boggs

What's the best way to get the primary key of a row just inserted into a
mySQL database?

If the primary key is autoincrement, I insert a row.  It's successful,
but now how to do I read back the key of this table?

Right now I'm adding a md5 hash of the session id into the row I'm
inserting, and then will read that row back.  But this seems clunky

Should I just go for a keytable approach?  Where I have a no
autoincrement fields and just a table that holds the key value for each
table.  When I insert a row, I lock the row of the keytable I'm inserting
int, update it's value, write it back, then use that key to insert into the
main table?

--
==
Grant Boggs
http://www.cornersonesoftware.ws



-- 
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] Getting key of row just inserted into mySQL

2001-08-22 Thread Grant Boggs

Matthew Loff [EMAIL PROTECTED] wrote in message
002b01c12b64$92e1cc80$0100a8c0@bang">news:002b01c12b64$92e1cc80$0100a8c0@bang...

 This has been covered countless times on the list...  :)

 http://www.php.net/manual/en/function.mysql-insert-id.php

I figured as much.  Thanks guys!

--
======
Grant Boggs
http://www.cornersonesoftware.ws



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

2001-08-20 Thread Ian Grant

mysql_insert_id([resource link_identifier]) returns the value of the
auto_increment field for the previous INSERT query. It will return 0 if
there is not an auto_increment field. If the link_identifier is not
specified, the last opened connection is used.

So, use $id = mysql_insert_id(); directly after your $result =
mysql_query($query); operation (where $query is an INSERT query) to pull the
id value you have just auto inserted back out.


Ian.

Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php
Crosswalkcentral [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I tried this and it gave me an error.

 Will this

 $id = mysql_insert_id();

 allow me to pull out the id?


 --
 Cross Walk Central
 www.crosswalkcentral.net
 Support Center
 Your Web Hosting Community!

 Cynic [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  At 19:19 8/19/2001, CrossWalkCentral wrote the following:
  --
  I have a script where I submit user data to the database in my script I
 need
  to get the id  # how can I do this w/o creating a query that does the
  following considering that user could have 10 other entires.
 
  mysql_query(insert into ...);
  $id = mysql_insert_id();
 
 
  // Request info
  $result = mysql_query(
  SELECT * FROM supportsys WHERE email = $email);
  if (!$result) {
  echo(PError performing query:  .
  mysql_error() . /P);
  exit();
  }
  
  
  I basicly need to get the id$ of the record just entered
  --
  Cross Walk Central
  www.crosswalkcentral.net
  Support Center
  Your Web Hosting Community!
  
  
  
  
  --
  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]
  --end of quote--
 
 
  [EMAIL PROTECTED]
  -
  And the eyes of them both were opened and they saw that their files
  were world readable and writable, so they chmoded 600 their files.
  - Book of Installation chapt 3 sec 7
 





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

2001-08-20 Thread Ian Grant

Just a little addition...
I use this function to get the id value, given a field name, field data and
table name:

function getId($fname,$data,$tblName) {
GLOBAL $conn;
$query = SELECT id FROM $tblName WHERE $fname = '$data';
$result = mysql_query($query);
$row = mysql_fetch_row($result);
$id = $row[0];
return $id;
}

Ian.



Ian Grant [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 mysql_insert_id([resource link_identifier]) returns the value of the
 auto_increment field for the previous INSERT query. It will return 0 if
 there is not an auto_increment field. If the link_identifier is not
 specified, the last opened connection is used.

 So, use $id = mysql_insert_id(); directly after your $result =
 mysql_query($query); operation (where $query is an INSERT query) to pull
the
 id value you have just auto inserted back out.


 Ian.

 Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php
 Crosswalkcentral [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I tried this and it gave me an error.
 
  Will this
 
  $id = mysql_insert_id();
 
  allow me to pull out the id?
 
 
  --
  Cross Walk Central
  www.crosswalkcentral.net
  Support Center
  Your Web Hosting Community!
 
  Cynic [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   At 19:19 8/19/2001, CrossWalkCentral wrote the following:
   --
   I have a script where I submit user data to the database in my script
I
  need
   to get the id  # how can I do this w/o creating a query that does the
   following considering that user could have 10 other entires.
  
   mysql_query(insert into ...);
   $id = mysql_insert_id();
  
  
   // Request info
   $result = mysql_query(
   SELECT * FROM supportsys WHERE email = $email);
   if (!$result) {
   echo(PError performing query:  .
   mysql_error() . /P);
   exit();
   }
   
   
   I basicly need to get the id$ of the record just entered
   --
   Cross Walk Central
   www.crosswalkcentral.net
   Support Center
   Your Web Hosting Community!
   
   
   
   
   --
   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]
   --end of quote--
  
  
   [EMAIL PROTECTED]
   -
   And the eyes of them both were opened and they saw that their files
   were world readable and writable, so they chmoded 600 their files.
   - Book of Installation chapt 3 sec 7
  
 
 





-- 
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] query returned Resource id #2

2001-08-17 Thread grant

That Resource ID #2 is the connection or result set.  You need to use the
connection to do a query, which returns a result set, then use the result
set to do fetches.  Those will return an array of the stuff you really
wanted.

__

  Your mouse has moved.
   You must restart Windows for your changes to take effect.

#!/usr/bin/perl
print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);



-- 
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] query returned Resource id #2

2001-08-17 Thread grant

This uses PostgreSQL, but the concepts are the same for MySQL.

On Fri, 17 Aug 2001, Alex wrote:

 Could you give me an example?

 Grant wrote:

  That Resource ID #2 is the connection or result set.  You need to use the
  connection to do a query, which returns a result set, then use the result
  set to do fetches.  Those will return an array of the stuff you really
  wanted.
 
  __
 
Your mouse has moved.
 You must restart Windows for your changes to take effect.
 
  #!/usr/bin/perl
  print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);


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


 resume.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP-DB] HTML editors

2001-08-16 Thread Ian Grant

Hi,

I'm looking for something similar to eWebEdit Pro
(http://www.ewebeditpro.com), but a lot less costlier!
The idea is using a HTML form to write articles to a PHP/MySQL-driven
dynamic site. Obviously, people can cut and paste HTML into a textarea
tag, but having a WYSIWYG editor in place of the textarea tag would be
better, considering the users are not going to be HTML-proficient.

However, I cannot seem to find anything like this that doesn't cost loads.
Does anyone know of anything similar?


Thanks,

Ian Grant.

--




-- 
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] Close Postgresql Database Connection Problem !

2001-08-15 Thread Grant Johnson

Perrin wrote:
 == $connection  = pg_connect($constr user='$USER' password='$PW');
 
 Actually It should be closed the connection after access finished, like that 
pg_close();
 
 == pg_close($connection);
 
 But if the user force to close the web page that means have not close the 
connection. I want to ask the connection will be closed by Apache Server automatic ? 
or when user closed the web page the connection will be closed at the same time ? If 
the connection have not been closed automatic. So the Apache Server will keep the 
connect port forever ?
 Actually the connection port handle by Apache Server or PHP ?
 
If you use pg_connect, it will close when the script is finished, like
when the page is to the browser.  If you use pg_pconnect, it will stay
open for other pages to use.  I am not sure how pg_close affects a
pg_pconnect.  As most of the overhead with postgres is in opening the
connection, I use pg_pconnect, and never close it.  This improves
performance, but if I want to shutdown, I have to shutdown apache before
I shut down postgres just in case there was some recent activity, and it
hasn't timed out yet.

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

2001-08-13 Thread Ian Grant

Yes, thank you, this works!

Ian.

Paul Burney [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 on 8/10/01 7:50 AM, Ian Grant at [EMAIL PROTECTED] wrote:

  I've got a simply search form, on my site using PHP and MySQL.
  It writes a SELECT query  using WHERE (Field LIKE '%thingy%') where
thingy
  is the word entered in the form. It works fine if the submit button is
  pressed, but if you press return after typing the word, instead, it
fails
  and writes nothing for the query, so it ends up like WHERE ()

 Browsers differ on how they interpret the hitting of the return key and
 which fields get submitted.  I'd guess you have an input type='submit'
 name='submit' value='yes' type field and you are checking isset($submit).
 Some browsers (Netscape on the Mac, for example) won't submit the
name-value
 pair associated with the button.

 One solution is to do this instead:

 input type=hidden name=submit value=yes
 input type=submit value=Search!

 No matter how the form is submitted, the submit variable will be set to
yes.

 Sincerely,

 Paul Burney

 ++
 Paul Burney
 Webmaster  Open Source Developer
 UCLA - GSEIS - ETU
 (310) 825-8365
 [EMAIL PROTECTED]
 http://www.gseis.ucla.edu/
 ++





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

2001-08-10 Thread Ian Grant

Hi,

I've got a simply search form, on my site using PHP and MySQL.
It writes a SELECT query  using WHERE (Field LIKE '%thingy%') where thingy
is the word entered in the form. It works fine if the submit button is
pressed, but if you press return after typing the word, instead, it fails
and writes nothing for the query, so it ends up like WHERE ()


Any pointers?

Thanks,

Ian.

--




-- 
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] Another SELECTING problem :-(

2001-08-09 Thread grant

Another possible solution (although more drastic) is to switch DBMS's.  I
use PostgreSQL with no troubles.  However, 6.5 and earlier are not so
great performance wise.  7.0.3 is OK, and 7.1.2 is exceptional.  It also
now (finally) supports outer joins and write ahead locking.

If you are at the beginning of a project, this might not be a big switch.
If you have a lot of data already loaded, this would be an unpleasant
solution.

__

  Your mouse has moved.
   You must restart Windows for your changes to take effect.

#!/usr/bin/perl
print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);



-- 
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] ranking database searches

2001-08-08 Thread grant

2 ideas:
1) Define the loosest item that returns results (likely regex) then search
with slightly tighter criteria within the results.

Good for situations where even partial matches are a small percentage of
the total data

2) Check every record, and give it a score based on proximity to the
search criteria, then sort.

Good for returning the top N results with the possible results being a
large portion of the total.


Of course you could combine the two and get a subset, then score it and
sort

Just ideas

__

  Your mouse has moved.
   You must restart Windows for your changes to take effect.

#!/usr/bin/perl
print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);



-- 
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] NON sql database

2001-08-04 Thread Grant Johnson

Eric Marenyi wrote:
 
 I am trying to develop a dynamic website, but I dont have the capability to
 use SQL, or Access databases, can I use PHP to interface with a different
 type of database?, maybe a text delimited, or something, please help, thanks
 
 --
 Eric Marenyi
 CEO Virtual British Airways
 http://www.virtualbritishairways.com
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

If you are on a Windows machine, you can connect to anything that will
work with ODBC.  If you are on a Unix or Linux machine, I have 3 or 4
good ones (1 REALLY like) that are full multi-user servers all for $0.

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

2001-08-03 Thread grant

On Fri, 3 Aug 2001, Robert Fitzpatrick wrote:

 Hello:

 I configured PHP originally --with-mysql and now I want to also use
 PostgreSQL with PHP. Can I just re-run the './configure --with-mysql
 --with-pgsql --enable-track-vars' again. Then do another 'make' and 'make
 install'?

 Thanks for the help:)

If you built it as a static linked apache module, you will have to make
and make install Apache too, but you should not have to ./configure
Apache.


-- 
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] Making a new row in HTML tables

2001-07-25 Thread Ian Grant

Hi,

Can anyone help me with this - I have a database of people, that I want to
print into an HTML table - how can I make the table wrap into an equal
number of rows.
i.e. if there are 4 entries, a 2x2 table, 6 a 2x3, 8 a 2x4, 9 a 3x3, etc.

At the moment, I have something like:

$rows=mysql_num_rows($result);
$i=1;

while ($array = mysql_fetch_array($result))  {

  print (td
align=\center\.$array[Image].br.$array[Name]./td\n);

 if (is_int($rows / $i)) {
  print (/tr\ntr);
  }

 $i++;
  }

Thanks,

Ian.

--




-- 
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: Making a new row in HTML tables

2001-07-25 Thread Ian Grant

Yeah, but if I had 31,
I'd want 6x5 and then 1 over, or something


Hugh Bothwell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Umm... 31 entries, 1 x 31...

 You might be better to choose a standard width and pad the last row with
 empty cells.

 Ian Grant [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi,
 
  Can anyone help me with this - I have a database of people, that I want
to
  print into an HTML table - how can I make the table wrap into an equal
  number of rows.
  i.e. if there are 4 entries, a 2x2 table, 6 a 2x3, 8 a 2x4, 9 a 3x3,
etc.






-- 
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] Postgres Library problems

2001-07-21 Thread Grant Johnson

Sorry I am not replying to the thread.  I deleted the message, not
thinking.

If you install PostgreSQL from source, and take the defaults, it puts
its files in /usr/local/pgsql/...   Each of theses subdirectories
matches one in /usr/local/...   What I do is create symlinks win
/usr/local so I don't have to add them to any paths, like:

cd /usr/local/lib
cp -rs ../pgsql/lib/* .

And so on for the other directories (bin, include, etc.)  It works great
that way.

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

2001-03-24 Thread Grant

Hello all

Is there any way of using a string in an SQL query instead of using the
table name. Something along the lines of

$result=mysql_query("SELECT * FROM $tablename",$db);

this doesnt work it come up with a parse error

thankyou

Grant



-- 
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] Search engines database driven sites

2001-02-27 Thread Grant Ballard-Tremeer

Greetings

I'm not sure my question fits into the remit of this list - so apologies in
advance if it's off track... Please point me in a more suitable direction is
necessary!

I recently converted my sites from hardwired HTML to a PHP/MySQL
combination - with dynamic 'newsy' info held in a database, tailored for
each visitor. Unfortunately the 'hit rate' from search engines has gone
virtually to zero as Altavista, Hotbot etc. removed me from their indexes -
they don't index .php files as far as I can see, and also don't follow links
on php pages (I imagine it's the same for ASP, ColdFusion etc.). In contrast
Google and All The Web have no problems with the .php extension (and even
index my .pdf files!).

I would be grateful for any wisdom on how best to deal with this. I could of
course make an HTML intro page, but that would be a pity since I'd hardly be
able to an intro page that conveys all the necessary info to bring the right
visitors. Any advice on how to do this well? I could alternatively change
the setting of the PHP parser to parse all .html as if it's php.
Unfortunately I'm sharing a server right now and my ISP is unlikely to
accept this because of the reduction in performance (I may be prepared to
move to a dedicated server if necessary though). Lastly I thought of writing
a PHP routine that, run once a day, will make a few HTML 'mirror' pages
based on the content of the database to capture the search engine visitors.
I could do that, but it seems to defeat the purpose of the dynamic pages
somewhat... pity.

Any other ideas? How do others deal with this issue?

Regards
Grant

---
Grant Ballard-Tremeer,
HEDON Household Energy Network http://www.ecoharmony.net/hedon/
eco Ltd. http://ecoharmony.com
---




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]