[PHP-DB] Access querys to a csv

2003-02-16 Thread Donald S. Booth
Hi all, I am trying to dump an Access db query and form it into a comma delimited file. I get the query ok. I can get it into a table with odbc_result_all. If I print the variable, it shows the first value from the first row... Any hints on the path I should take? Thanks, D -- PHP Database

Re: [PHP-DB] printing repeat table headers

2003-02-16 Thread Ignatius Reilly
It is not easy to design a SQL query that will repeat headers every 33 rows. So this should be done in the PHP code. Why not use a counter, that you increment at every mysql_fetch_array() and test if !( $counter % 33 ) Side remarks: you could also define a CSS class for TH and use TH as headers.

[PHP-DB] Help with array

2003-02-16 Thread John Thorne
Hello Working with jpGraph Gnatt Graph Sample gnatt files shows data array as follows: $data = array( array(0,Concept,2002-9-1,2002-9-15,blue), array(1,Creative,2002-9-15,2002-9-30,red), array(2,Produce,2002-9-31,2002-10-10,green)): Output $data looks like this: 0: 0 1: Concept 2: 2002-9-1 3:

[PHP-DB] Re: Help with array

2003-02-16 Thread Fredrik de Vibe
[EMAIL PROTECTED] (John Thorne) writes: $data[$cpt]= $row[0].,.$row[1].,.$row[2].,.$row[3].,.$row[4]; What you need is a two dimensional array. The code above concatenates the $row elements into a string and puts this string into a one dimensional array. the 2D array $foo[3][5] can be seen as:

[PHP-DB] PHP IBM-DB2 ODBC CLIError message

2003-02-16 Thread Leonidas Pispiriggas
I want to transfer a large amount of data(at least 5000 records with 10 fields) from MSAccess to DB2 through PHP_ODBC. When I run my script i get an error message No more Handles(see at the end the exact message). I found this message at hte information Center but it didn't help me much. Also i

[PHP-DB] Re: When to do free()?

2003-02-16 Thread David Chamberlin
Hmmm...still no takers on this one I decided out of curiosity to start liberally adding free() calls whenever I did a db-query(). Unfortunately it seems that the free() call causes it to die. Not quite sure why, but it did. Most of the calls that I use a query() for (as opposed to

[PHP-DB] .htaccess

2003-02-16 Thread Matt
Hey, this isn't totally a php question, but I would appreciate if anyone has any advice for me. I have a php script that accesses a folder, and displays all the photos inside the folder. I want to use this script to display images that people upload from the anonymous ftp account. I know that

Re: [PHP-DB] .htaccess

2003-02-16 Thread heilo
Hi! Normally one would read that folder with read() and echo all the files makeing hrefs like this: $dir = open('/home/username/public_ftp/incoming/'); while($file = $dir-read()) echo 'a href='.$file.''.$file.'/abr'.\n; Don't forget to make sure, that the path is ok within the href... -

[PHP-DB] Virtual Tables

2003-02-16 Thread Philip Zee
In MySQL, I have noticed that you can't create a virtual table by using the following syntax: select * from (select * from table where agyID=1) where clnID=... Is this correct? Thanks for your time, Philip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Web Page Caching

2003-02-16 Thread Philip Zee
Hello, I don't know if this is the right list to send this question to. It appears that the browser caches the result after a PHP page updates the database. I have to manually reload it in order to see the updates. Does anyone know how to overcome this? Thanks, Philip -- PHP Database

[PHP-DB] Newbie Question - PHP and MSACCESS

2003-02-16 Thread J.M. Cocchini
Hi, Am using php to open a customer's msaccess file. First time for everything. It's a very small database of less then 25 rows, and will always be this small. Am needing to return all the rows to a web page using php at all times. Very simplistic. Am apparently set up correctly on the

RE: [PHP-DB] Web Page Caching

2003-02-16 Thread Ruprecht Helms
Hi Philip Zee, I don't know if this is the right list to send this question to. It appears that the browser caches the result after a PHP page updates the database. I Possible that your browser stored the content of the page as normal html-page. Normaly CGI and dynamic webcontents are not

[PHP-DB] Re: Web Page Caching

2003-02-16 Thread Fredrik de Vibe
[EMAIL PROTECTED] (Philip Zee) writes: I don't know if this is the right list to send this question to. It appears that the browser caches the result after a PHP page updates the database. I have to manually reload it in order to see the updates. Does anyone know how to overcome this? If you

[PHP-DB] Re: Help with array

2003-02-16 Thread John Thorne
Thanks for the reply I do not under stand how to apply your example $foo[$i][$j] = bar; Graph example array trying to create thru sql: $data = array( array(0,Concept,2002-9-1,2002-9-15,blue), array(1,Creative,2002-9-15,2002-9-30,red), array(2,Produce,2002-9-31,2002-10-10,green)): Output $data

[PHP-DB] Re: Help with array

2003-02-16 Thread Fredrik de Vibe
[EMAIL PROTECTED] (John Thorne) writes: [ snip ] $data[$cpt]= $rownu.,.\.$row[0].\.,\.$row[1].\,.\.$row[2].\; This is a string, not an array. Could you go a step farther in the $foo[$i][$j] please $data[$cpt][0] = $rownu; $data[$cpt][1] = $row[0]; $data[$cpt][2] = $row[1]; $data[$cpt][3]

[PHP-DB] Odd characters

2003-02-16 Thread Kim Kohen
G'day all, I have a folder with an Ÿ (Option-F) in the name which PHP processes as Ä. Is there some sort of encoding/unencoding which will handle this character correctly? I've tried URLencoding and htmlspecialchars but I don't really know what to search for in the docs. cheers kim -- PHP

Re: [PHP-DB] .htaccess

2003-02-16 Thread David T-G
Matt -- ...and then Matt said... % % I have a php script that accesses a folder, and displays all the photos % inside the folder. I want to use this script to display images that people % upload from the anonymous ftp account. I know that when they upload a photo, % it goes into the: % %

[PHP-DB] Re: Help with array

2003-02-16 Thread John Thorne
$cpt=0; $rownu =1; while($row = mysql_fetch_row($result)) { $data[$cpt][0] = $rownu; $data[$cpt][1] = $row[0]; $data[$cpt][2] = $row[1]; $data[$cpt][3] = $row[2]; $rownu++; $cpt++; This worked perfectly Fredrik.. thank you jrt Fredrik De Vibe [EMAIL

RE: [PHP-DB] Newbie Question - PHP and MSACCESS

2003-02-16 Thread Dennis Cole
$cnx = odbc_connect( 'DSN' , 'USER', 'PASS' ); if (!$cnx) { ?Could not connect to ODBC? } $cur= odbc_exec( $cnx, SELECT Vehicle.Vehicle_ID, Vehicle.Cust_ID FROM Vehicle ); if (!$cur) { Error_handler( Error in odbc_exec( no cursor returned ) , $cnx ); } //

[PHP-DB] Re: Web Page Caching

2003-02-16 Thread Adam Royle
This may not be true in your case, but I remember another user on this list claiming a similar thing, and his problem was actually code-related. He had his db update code *AFTER* the results were displayed (ie. doing edit and save on same page). Check your programming logic. Just a note to

Re: [PHP-DB] Re: php date manupulation functions

2003-02-16 Thread Rajesh Fowkar
On Sun, Feb 16, 2003 at 08:14:57AM -0800, David Chamberlin wrote: David Elliott wrote: try ? echo date(d,$dbdate).br; echo date(m,$dbdate).br; echo date(y,$dbdate).br; ? I thought date() took a timestamp, not a string. Here's what I do: $timestamp = $dbdate; echo date(d,$timestamp) echo