[PHP-DB] Problem with file() function

2002-02-19 Thread Hayan Al Mamoun
Dear sirs, Please help with the follows: When I'm trying to execute this code: $fcontents = file ('http://localhost/'); while (list ($line_num, $line) = each ($fcontents)) { echo "Line $line_num:; " . htmlspecialchars ($line) . "\n"; } -

RE: [PHP-DB] How to make logout from database server (ORACLE for example) when user closes its session

2002-02-19 Thread Hunter, Ray
Do not use persistent connections to the database. Use non-persistent connections and make sure to close them. Persistent connections will linger around for a while then close. Also, check the documentation on oracle concerning persistent connections http://otn.oracle.com . Ray Hunter Firmware

RE: [PHP-DB] Problem with file() function

2002-02-19 Thread Hunter, Ray
If you are behind a firewall or proxy, you will not be able to connect to www.php.net. If you are not behind a firewall or proxy and you are getting php_hostconnect errors then you need to make sure that you can get to the php.net other than with your browser. You can also try using fopen() as w

[PHP-DB] Problem displaying dates

2002-02-19 Thread George Pitcher
Hi all, I've just moved my MySQL db and php scripts over from W2K to Linux and for some reason my dates are coming across as '-00-00' even though, viewing the db in MySQLFront, they look fine (actual dates). When I hosted this on Win2K it worked fine. I use a function to convert the date fo

RE: [PHP-DB] Problem displaying dates

2002-02-19 Thread Rick Emery
Mate, what code/function are you using to convert the dates? what do your data look like in the table (structure, examples)? -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 8:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Problem displa

[PHP-DB] Re: mysql_connect() and phpmyadmin

2002-02-19 Thread Goldpoint
Dear Martin, Why don't you try this : Please note that the IP address for localhost is 127.0.0.0 not 127.0.0.10. Regards, Noppanan Arunvongse Na Ayudhaya "Martin Allan Jensen" <[EMAIL PROTECTED]> wrote in message 005901c1b40d$6143c390$040a@IceSystems">news:005901c1b40d$6143c390$040a

[PHP-DB] starting odbc for w2k and iis

2002-02-19 Thread Eduardo Cancino
Hello everybody, i'm new to the list, and i want to know where i get started with and odbc connection to sql server 2k any tutorial or manual, would be appreciated Thanks in advance. -- Eduardo Cancino [EMAIL PROTECTED] --- Coordinador de Desarrollo Web CENTRO DE INFORMAC

[PHP-DB] A good tutorial

2002-02-19 Thread Jennifer Downey
If anyone knows of one, would someone please point me towards a good tutorial on storing images in a database then fetching them out again. I would really appreciate it and thanks in advance! Jen Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

RE: [PHP-DB] starting odbc for w2k and iis

2002-02-19 Thread Andrew Hill
Eduardo, Under Windows, you can simple configure a System DSN in the ODBC Administrator, and then use the ODBC functions in PHP: www.php.net/odbc, as ODBC support should be enabled by default. You can also connect to SQL Server on Windows from a *nix platform, using the PHP-ODBC-HOWTO at www.iod

RE: [PHP-DB] A good tutorial

2002-02-19 Thread Hunter, Ray
It depends on the database that you are using. One of the best databases I have used for storing images has been with oracle. You need to look up the documentation on there web site. http://otn.oracle.com. As for the other databases, I have not used images with them. On oracle I have used BLO

[PHP-DB] Secure Sybase DB connection

2002-02-19 Thread Dennis Khaw
Hi Everyone, I am relatively new to php. I am currently developing a php 4.x application running on an apache 1.3.x web server which connects to a remote sybase SQL ASE 12 server. My main concern is with the command sybase_connect ("server", "username","password") on the web server. Obviously, t

[PHP-DB] SQL Server script conversion tool?

2002-02-19 Thread eshipman1
Anyone have a tool that takes a SQL Server generated script and converts it to a mySQL script? -- __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Nets

[PHP-DB] Need smoe code examples on creating tables for mysql in php

2002-02-19 Thread CrossWalkCentral
Need some code examples on creating tables for mysql in php can any one help me on this . I searched the php.net site and only found info on creating a database I just want to create a php script that will make 2 tables with lets say 5 fields each in them.

RE: [PHP-DB] Need some code examples on creating tables for mysql in php

2002-02-19 Thread Rick Emery
Huh $query = "CREATE TABLE mytable (". "field1 int,". "field2 varchar(50),". "field3 decimal(6,2),". "field4 int,". "field5 int )"; mysql_query($query) or die("Error: ".mysql_error()); -Original Message- From: CrossWalkCentral [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2

RE: [PHP-DB] Need smoe code examples on creating tables for mysql in php

2002-02-19 Thread Matt Williams
> Need some code examples on creating tables for mysql in php > > can any one help me on this . I searched the php.net site and > only found info on creating a database I just want to create a > php script that will make 2 tables with lets say 5 fields each in them. Hi Maybe you wanna head on ov

Re: [PHP-DB] Need smoe code examples on creating tables for mysql in php

2002-02-19 Thread William Fong
Hate to cheat, but have you tried phpmyadmin? It will do a lot of that work for you and show you the SQL statement. I wouldn't rely on it for complex actions, since it doesn't seem to be 100% perfect, but, it'll give you the idea on what you should be looking towards and a starting place to look

[PHP-DB] Re: A good tutorial

2002-02-19 Thread Lerp
Hi Jen, here's some code I posted up in the general ng for storing in db and retrieving images from db for display on your page. It's recommended that you stay away from storing actual images in the db. If you are storing a path the code below might help you out. It select a firstname, and an imag

[PHP-DB] Re: A good tutorial

2002-02-19 Thread Lerp
Ammendment: Make sure you test for the proper file extension before you actually upload it. The last thing you want is someone uploading a text file instead of the type of file you are looking for! I forgot to add that in the code. Grab the last 4 characters off of the end of the filename and det

RE: [PHP-DB] Re: A good tutorial

2002-02-19 Thread JD Daniels
I am just going to interject a second here... sorry :P About storing images on a server... I did that for awhile, but once i hit 1000+ images, my scripts started timing out.(from reading the directory) Storing them in the DB seems to actually improve performance for php... Another issue is that I

[PHP-DB] SQL

2002-02-19 Thread Jonathan Underfoot
Is it possible to do a comparison of values from a count... for example... SELECT table1.name, count(table1.name) as num1, count(table2.name) as num2 FROM table1, table2 WHERE table1.name = table2.name AND num1 = num2 This sort of thing dosent work for me. How do I reffrence a count later in

RE: [PHP-DB] SQL

2002-02-19 Thread Rick Emery
How could you possibly have such a condition exist? That is, what relation do the counts have to the contents of the name field? What ARE you trying to really accomplish? -Original Message- From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 2:57 PM To:

Re: [PHP-DB] SQL

2002-02-19 Thread Jonathan Underfoot
ok... authorizations and charges... two tables.. Card Number 1 gets authorized 20 times for use (20 rows in the authorizations table) and when the transaction is completed they get charged 20 times (20 rows in the charges table) .. however we've been finding that authorizations are not always en

[PHP-DB] mysql LIMIT and ORDER BY problem

2002-02-19 Thread Fredrik Wahlberg
I have a strange problem with LIMIT. When I use it like "SELECT * FROM table LIMIT 0, 10" it works fine. When I add a sort and write the query like "SELECT * FROM table ORDER BY col ASC LIMIT 0, 10" I get no results. What am I missing? /Fredrik -- PHP Database Mailing List (http://www.php.ne

Re: [PHP-DB] Re: A good tutorial

2002-02-19 Thread Joe Van Meer
> perfect solution yet :) is there such a thing? :) Jd Daniels <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am just going to interject a second here... sorry :P > > About storing images on a server... I did that for awhile, but once i hit > 1000+ images

[PHP-DB] formating problem

2002-02-19 Thread jas
I feel kinda dumb for posting this but here it is... I am trying to query a table then format the results so it looks like the rest of the site and the darn delete button to remove db entries keeps showing up at the top. Here is the code... Thanks in advance. Jas Current Inventory"; $count = -1;

Re: [PHP-DB] Re: A good tutorial

2002-02-19 Thread Joe Van Meer
Hi again JD...I got to thinkin':) Just out of curiosity...how many images were you bringing back from the db when your script timed out? I store the path of my image in the db and echo it out when I need to. Cheers Joe:) Jd Daniels <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">new

RE: [PHP-DB] Re: A good tutorial

2002-02-19 Thread JD Daniels
It has never timed out bringing back from the db... only when reading from disk. I think the big difference is I need to create both fancy web pages and neat printable pages. So I need to open up an image stream to manipulate the photo. I had a top level dir called photos, then a sub folder named

Re: [PHP-DB] Re: A good tutorial

2002-02-19 Thread Joe Van Meer
Thanks for the info JD , will keep this in mind for projects that retrieve higher number of images . Currently I'm only bringing back 1-3 images from the dir (sorry...meant dir instead of db in previous post:)at time and it doesn't seem too bad. Cheers, Joe:) Jd Daniels <[EMAIL PROTECTED]> wrote

[PHP-DB] Problems with creating a report

2002-02-19 Thread Rod Wilkinson
I've been struggling with creating a rate report based on data extracted from a Mysql table. I had written a piece of PHP code for creating the type of report I needed but it has turned out buggy and prone to errors. I then tried grouping the rates data in an sql statement but this omits lines and

RE: [PHP-DB] formating problem

2002-02-19 Thread Beau Lebens
htat's because the delete button is in the wrong place in your code. if you put an HTML element between the and tags, but don't enclose it in at least and tags (pretty loose about closing them, but of course you should always close your tags!) then the browser will display that element above

Re: [PHP-DB] SQL

2002-02-19 Thread Frank Flynn
Jonathan, You didn't mention which DBMS you're using (Oracle, MySQL, MS SQL, ...) and the are each a little different but I'll try to solve with fairly generic SQL: My personal preference is keep it simple, break up the SQL if it helps (and I think it would help here). I'd use a third table, it

[PHP-DB] Re: Problems with creating a report

2002-02-19 Thread Frank Flynn
Rod, I hope I've got what you're trying to do. You have a table with a record for each day and columns rate1 and rate2 - You are trying to collapse the single days into a range where the rates are the same? So if I added column titles to your sample report: Start Endrate1 ra