[PHP-DB] PHP/MySQL to DBF

2002-02-14 Thread Daniel Barton
Hello all, I'm looking for a PHP tool that would take the results of a MySQL query and send them to a client browser in DBF format. I wrote an output tool that sends a query result as CSV to the browser, but DBFs are much more handy in this particular case. Does this exist? I

Re: [PHP-DB] Php4 and Interbase 6 on linux

2002-01-24 Thread Daniel Barton
Hi, You need to recompile PHP with support for Interbase. I would recommend reading the instructions on linux PHP installations on the PHP website. I imagine the conifgure option is something like --with-interbase=path_to_interbase but definately don't quote me on that. Cheers, db Paulu van

Re: [PHP-DB] MySQL/PHP and the case of "Good Lord, that's a lot ofstatements"

2002-01-15 Thread Daniel Barton
Could the script be hitting it's head on the ceiling and then pooping the bed? I've had a similar problem, when the script exceeds the (default) 8M mem limit. Could it be that because of the size of the file? -db Tobyn Baugher wrote: > Hi All, > > Normally I try not to take work home with me, m

[Fwd: [PHP-DB] A local file copy question]

2002-01-15 Thread Daniel Barton
oops. -- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] --- Begin Message --- Hi, There are several PHP-Apache environment variables that may do what you're interested in. (I'm not

Re: [PHP-DB] The New Guy

2002-01-14 Thread Daniel Barton
Paul, Just a clarification: I wasn't the original poster. Christopher J. Crane was the original asker of the CSV/flat file database question. I do have a db to use. Cheers, db Paul Burney wrote: > on 1/14/02 2:12 PM, Daniel Barton at [EMAIL PROTECTED] appended the following >

Re: [PHP-DB] The New Guy

2002-01-14 Thread Daniel Barton
s >(and you are not the first > to have done so in the last few days - FYI Mr anti-Newbie Basher). > > If you have a problem with people on this list, please do unsubscribe (quietly). If >you prefer the company of > others, please do take Dan's advice. Your experience is contrary

Re: [PHP-DB] The New Guy

2002-01-14 Thread Daniel Barton
d direct with the answers someone seeks. > ----- Original Message - > From: "Daniel Barton" <[EMAIL PROTECTED]> > To: "Christopher J. Crane" <[EMAIL PROTECTED]> > Sent: Sunday, January 13, 2002 9:10 PM > Subject: Re: [PHP-DB] The New Guy > > &

Re: [PHP-DB] ADDING DATES

2002-01-14 Thread Daniel Barton
ote: > Hear, hear! > =dn > > > Yep, maybe it is, but when a post starts with " ... but i am getting lazy", > > I get a bit peeved. The implication is "Do my work for me." > > > > It's different when the context is I want to do this ... tri

Re: [PHP-DB] ADDING DATES

2002-01-13 Thread Daniel Barton
Miles, Hmm... "RTFM!" .. That's a pretty unproductive post. Pedro, There are two PHP functions that will suffice. date() and mktime(). I've cut and pasted this from the PHP manual: $tomorrow = mktime (0,0,0,date("m") ,date("d")+1,date("Y")); $lastmonth = mktime (0,0,0,date("m")-1,date("d"),

Re: [PHP-DB] MySQL Result Resource

2002-01-10 Thread Daniel Barton
Andrew: Don't put quotes around your MySQL function call. i.e. PASSWORD($password) not 'PASSWORD($password)' p.s. Looking at this thread, it seems like most of the errors you're encountering have nothing to do with md5() or password(), but with syntax, like placement of quotes, or whether th

Re: [PHP-DB] PHP/MySQL Library Catalog System

2002-01-10 Thread Daniel Barton
Hi again everyone, Alnisa Allgood wrote: > You may want to check HotScripts, or the PHP Resource Index > (http://www.hotscripts.com) and (http://php.resourceindex.com). These > locations will most likely have an array of free or low-cost library > solutions. > Thanks all for the HotScripts

[PHP-DB] PHP/MySQL Library Catalog System

2002-01-10 Thread Daniel Barton
Hi all, I've noted that a least a couple of people on this list work with library catalog systems - I'm interested in finding out whether any of these systems are open-source or are available for a nominal fee. I'm familiar enough with PHP/MySQL to make one, but I'd also like to avoid re-inve

Re: [PHP-DB] query and count

2002-01-09 Thread Daniel Barton
Hi, I hate to simply refer to other sources in a response, but cross-tabulations are a large and rich subject which are too large for the time I have to write this email. I would suggest reading this article: http://www.devshed.com/Server_Side/MySQL/MySQLWiz which is a pretty good source o

Re: [PHP-DB] count query

2002-01-08 Thread Daniel Barton
Hi, SELECT SUM(IF(id = '2',1,0)) AS field_name FROM table Versatile command - you can use it for quite a lot of things. Barry Rumsey wrote: > Is it posible to do a count(*) on a tabe where id=2 and count just those that id = >2 -- -- Dan Barton Terrestrial Program Biologist Asst. D

Re: Fwd: Re: [PHP-DB] How to querry two db in a single statement?

2002-01-04 Thread Daniel Barton
Hi all: AFAIK, it is possible in a bunch of database software to query multiple DBs through joining. I have a Foxpro background (so most of what I say is therefore, b.s.) but you can define your query tables using this notation: database.table Which allows you to query multiple DBs. You should

Re: [PHP-DB] Date problem with new year

2002-01-02 Thread Daniel Barton
Hi, If you're unable/unwilling to modify your PHP installation, or just playing favorites with MySQL functions over PHP functions, an alternative to using the gregoriantojd() function is to use mysql's date functions to format the date as a julian date. (Check the mysql manual for detailed syntax

Re: [PHP-DB] newbie: MySQL Problem or severe ignorance..

2002-01-02 Thread Daniel Barton
Hello: I would actually disagree with [EMAIL PROTECTED] The mysql_query() function does not require both database and query as arguments, only query. The mysql_db_query() function does, thus the function name. Using mysql_query() with database as a parameter would actually be incorrect. (See the

Re: [PHP-DB] Dumb Question??

2001-12-17 Thread Daniel Barton
l: > > I get what you're saying, but I'm still having to hard-code it somewhere into my >scripts. I'm > working on a method of defining fields to include/exclude using arrays whose values >are given for > each application this system is applied to. (That'

Re: [PHP-DB] :: Problems With Interbase :: Please Help ::

2001-12-14 Thread Daniel Barton
Vins, Have you tried sticking the path of the database relative to the server root in there? like: /home/vins/interbase_data/NAMES.GDB or: /var/interbase_date/NAMES.GDB etc. ? -db Vins wrote: > Hi. > I need help with Interbase. > Here is my script... > > *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

Re: [PHP-DB] Re: Dumb Question??

2001-12-14 Thread Daniel Barton
Don't think that was the question...? Ian Ferger wrote: > $table = "some_junk"; > $resultset=mysql_query("select blah ,blah from $table"); > > "Russ Michell" <[EMAIL PROTECTED]> wrote in message > news:SIMEON.10112131209.A@k1c. anglia.ac.uk... > > Hi there everyone: > > > > I have a genericphp/M

Re: [PHP-DB] Dumb Question??

2001-12-14 Thread Daniel Barton
Russ - Why not (MySQL) extract the field always, and code into your (php) generic mechanism whether or not a particular field under that name appears? Using mysql_fetch_assoc() you could exclude 'modified' from your generic mechanism under particular circumstances. This avoids coding it into

Re: [PHP-DB] Dynamically populating a dropdown box

2001-12-14 Thread Daniel Barton
Chris - You're getting already getting plenty of answers to this question - I only have one suggestion, which is that if you're not doing it already, just write a function or create an object that makes a dropdown box. I have a function and a class that I use for creating dropdowns. Well, seve

Re: [PHP-DB] Page loading

2001-12-14 Thread Daniel Barton
Christopher: I can guess two reasons: a) You new directory has the same name as the directory in which php is installed - regardless of where it sits on the system (true for windows). Sounds odd, but I ran into this problem when I was goofing around on my development box and called a http docs d

Re: [PHP-DB] parse error

2001-12-13 Thread Daniel Barton
Rob - I think I see what you're doing: you're concatenating $message with something else (the HTML output following line 357?). Problem is, you're just stating the right hand side of what should be an assignment. The concatenation should be: $variable = $variable .= 'HTML output'; and it looks

Re: [PHP-DB] commence database

2001-12-05 Thread Daniel Barton
No, I don't think anyone's written PHP support for commence. But if commence is ODBC-compliant, you could probably feed it into another database for which PHP support is available. -db "Paul." wrote: > Hello all, > Has anyone heard about php reading the commence database? im very interested > i

[Fwd: [Fwd: [PHP-DB] Oracle functions]]

2001-12-03 Thread Daniel Barton
h I know is incorrect. It should be '1' = the number > in the table. Any other ideas. Please advise. Thanks. > > Daniel Barton wrote: > > > ooops, forgot to reply to list too. > > > > -- > > -- > > Dan Barton &g

Re: [PHP-DB] WAS: Use php to plot graph. NOW: ASCII GRAPH CONTEST

2001-12-03 Thread Daniel Barton
The method I used for ascii graphs was based on some C program I wrote that created an array, which was, in essence, the graph. Each array element was two characters wide (we''l see why..) The first column of the array is all |, to make a Y axis, and the last row if the array is all _, to make an

[Fwd: [PHP-DB] Oracle functions]

2001-12-03 Thread Daniel Barton
ooops, forgot to reply to list too. -- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] --- Begin Message --- Hola, Check out the php manual for an explanation of resources and arrays

Re: [PHP-DB] Use php to plot graph.

2001-12-03 Thread Daniel Barton
There are a few ways to go about this: You could: 1) Use little image blocks to dynamically build bar graphs. It's not too hard with PHP. Make some little square (or round or whatever) gifs (with transparent edges), and then position them on a background JPEG or gif using DIV tags. Make an objec

Re: [PHP-DB] How to install gdlibrary on windows 2000?

2001-11-30 Thread Daniel Barton
I volunteer to be a patient with some patience. Sorry to spam a little humor. -db "Frank M. Kromann" wrote: > You can download binaries (from latest cvs) from http://kromann.info/php4.php > > I'm not compiling all binaries at this point, but this page is updated every morning >at 4am. > > If y

Re: [PHP-DB] Help with mail notifying via file upload

2001-11-30 Thread Daniel Barton
Are you positive fileupload.php is passing $userfile to the mail() script? A blank result would seem to indicate that it's not getting passed. You could try passing it through the URL if they're seperate scripts. Or, you could just include the mail() script in fileupload.php, eliminating the ne

[PHP-DB] Awkward query - simpler method?

2001-11-30 Thread Daniel Barton
Hi, I can't seem to nail down the simplest way to do this. I've got 10-15 lines of code right now to do something that should take less. The following code extracts the names of all the fields in a table, prints them across a table row in their own cells, and then extracts each record and prin

Re: [PHP-DB] Converting MySOL query results into form elements.

2001-11-29 Thread Daniel Barton
Hi, I hope this is of some help. Programmatically, the idea is: (html) begin a select input type (php) connect_to_db ---> query ---> add options (one at a time, in a loop) (html) end the select input type The follwing code works for a table named projects with a field named project. Apply it

Re: [PHP-DB] JOIN - Not working.

2001-11-28 Thread Daniel Barton
orld example may have explained it better. > All the repeated 'whatever' kind of makes it a bit unexplained. > > Martin. > > -Original Message- > From: Daniel Barton [mailto:[EMAIL PROTECTED]] > Sent: 28 November 2001 4:14 PM > To: Martin E. Koss > Subject: Re: [PHP-DB] J

[Fwd: [PHP-DB] JOIN - Not working.]

2001-11-28 Thread Daniel Barton
-- -- Dan Barton Terrestrial Program Biologist Asst. Data Manager Point Reyes Bird Observatory http://www.prbo.org [EMAIL PROTECTED] [EMAIL PROTECTED] --- Begin Message --- Try: select sum(if(whatever=whatever,1,0)) as whatever from wherever where whatever=whatever; This is a pretty

Re: [PHP-DB] query + loop problem

2001-11-28 Thread Daniel Barton
Try using mysql_query to describe the table in question (describe $table), and use the output as a list of field names (and types). I wrote a generic script to do this for an app... can provide if needed (although it sure looks a little hacked right now, hmmm) -db Russ Michell wrote: > Hi

Re: [PHP-DB] any extra work need to make php mysql function available?

2001-10-31 Thread Daniel Barton
Hi, PHP and MySQL are not talking to each other. Numerous tutorials available on the web for getting MySQL, PHP, and Apache to work together... depending on how you installed PHP and MySQL, the method varies. If PHP is compiled with support for MySQL, it may be as simple as uncommenting or add

Re: [PHP-DB] Recurse thru dir into DB

2001-10-25 Thread Daniel Barton
I would suggest perhaps a different way (slightly larger use of disk space, but only one script and only one query, although a moderately complex query): 1) Subscriber's emails are stored in table 'A' with their associated category as a data field. 2) A unix_timestamp field is added to table 'A

Re: [PHP-DB] Hmmm? PHP+PostgreSQL

2001-10-24 Thread Daniel Barton
Have you checked if all modules are being loaded (obviously, PHP is being loaded into apache...but is PHP loading mysql.so and pgsql.so? Cheers, Dan Alexey Prohorenko wrote: > I've installed PostgreSQL into /usr/local/pgsql, then I tried > to include into my PHP support for Pos

Re: [PHP-DB] php/mySQL config

2001-10-18 Thread Daniel Barton
Hello, How are you able to connect to MySQL - through PHP or through your (XP?) user account? Does PHP connect to MySQL? If you can connect through PHP, then who is privileged to use the database you're trying to use? Have you tried connecting as the MySQL root user through a PHP script? Chee