Re: [PHP] Tutorial needed

2003-01-29 Thread salamander
Hi Alberto,

There are HOWTO's on this at www.iodbc.org

Best regards,
Andrew Hill

On Wednesday, January 29, 2003, at 12:53  PM, Alberto Brea wrote:


Does anybody know of an online tutorial explaining how to access ODBC 
databases with PHP?
Thanks
Alberto


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




Re: [PHP] what is the best way to handle connectivity

2002-10-07 Thread salamander

Jeff,

ODBC should work just fine - you can just link --with-iodbc as per the 
HOWTOs on www.iodbc.org.
If you use a native driver than the Informix client needs to be 
installed on the same box.

Best regards,
Andrew Hill
Director of Technology Evangelism - OpenLink Software
Universal Data Access and the Virtuoso Universal Server
http://www.openlinksw.com/virtuoso/whatis.htm


On Saturday, October 5, 2002, at 11:44 PM, Jeff Bluemel wrote:

 I've got informix on a sco open server box, and my webserver has php 
 4.2.3
 with apache.  I'm wondering what the best way to handle the 
 connectivity
 into the sco box is (not concerned with how difficult this is to 
 setup, but
 rather pure speed)

 do I try to use a native driver?  if I use the native driver does 
 informix
 have to be installed on the same box?  do I just try to use odbc?

 --
 Jeff Bluemel



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





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




Re: [PHP] Count number of rows in table.

2002-08-25 Thread salamander

or, you should be able to simply do this, without the cost of fetching 
the results:

$result = mysql_query(SELECT count(*) FROM table WHERE);
$num_rows = mysql_num_rows($result);
echo $num_rows Rows\n;


 $sql = select count(*) from table_name WHERE .;
 $result = mysql_query($sql) or die(mysql_error);
 $row = mysql_fetch_row($result);
 $rowCount=$row[0];
 or
 $sql = select count(*) from table_name WHERE .;
 $result = mysql_query($sql) or die(mysql_error);
 $rowCount=mysql_result($result);

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




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




Re: [PHP] Dynamically Downloading Data

2002-08-25 Thread salamander

Randy,

Try using a View, or a Temp Table in your database.
This keeps the data available in a specified form.

Best regards,
Andrew Hill
OpenLink Software

On Sunday, August 25, 2002, at 12:23 AM, Randy Johnson wrote:

 Hello,

 Is it possible to select data from a database and have it be available 
 for
 download without actually creating a file on the server?

 Randy



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




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




Re: [PHP] Count number of rows in table.

2002-08-25 Thread salamander

okay, so then a select * and then a num_rows ...

On Sunday, August 25, 2002, at 10:11 AM, Jason Wong wrote:

 On Sunday 25 August 2002 22:07, salamander wrote:
 or, you should be able to simply do this, without the cost of fetching
 the results:

 $result = mysql_query(SELECT count(*) FROM table WHERE);
 $num_rows = mysql_num_rows($result);
 echo $num_rows Rows\n;

 No. This only returns 1 row regardless. SELECT COUNT(*) FROM ... only
 returns a single row with a single column containing the row count. 
 Using
 mysql_num_rows() on that will always return 1.

 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 I'm going to Vietnam at the request of the White House.  President 
 Johnson
 says a war isn't really a war without my jokes.
   -- Bob Hope
 */


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




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




Re: [PHP] Free 'search engine' code

2002-08-11 Thread salamander

Edgard,

Check www.hotscripts.com for your needs - there is usually something 
there you can use or modify.

Best regards,
Andrew

On Sunday, August 11, 2002, at 08:24 PM, Edgard Berendsen wrote:


 What sort of counter?
 Hidden? Text file or database based?  Images or text on screen?  Per 
 page?
 Per site?

 Hidden or not hidden, database or no database based, with or wtithout
 images, per page or per site.

 What sort of search engine?
 Are you searching and indexing text files or text in a databases?  Are
 there
 categories and search methods, or just something simple?

 For searching HTML files, with cateogries.

 Thanks





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




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




Re: [PHP] Connection to Access 2000 mdb file on another computer.

2002-08-09 Thread salamander

Jason,

One option you have is to install OpenLink's Multi-Tier driver, ODBC 
Agent, which will allow you to piggyback on DSNs on other machines, 
e.g:

webserver with PHP, client side MT driver
DSN (let's call it local_dsn) with ODBC as ServerType, and IDS as Name

db server with MS Access, server side MT driver
DSN called IDS using MS driver for Access.

so:

PHP--local_dsn in client side MT-server side MT 
driver---ODBC Agent---IDS DSN.mdb file.

Selecting the appropriate platforms and database at the OpenLink 
Software Availability link will lead you to the appropriate components.

Let me know if you need additional clarification, although this example 
is pretty well laid out in the OpenLink MT docs.

Cheers,
Andrew

On Friday, August 9, 2002, at 04:48 PM, Jason Morcom wrote:

 Forgive my ignorance but i can not find how to connect to an Access 2000
 (mdb) file through PHP if the file is on another computer in a lan (not 
 on
 same computer as Apache/PHP server) I have no problem connectig to an 
 mdb
 through ODBC and a valid DSN(system) for a local mdb file, but i get a
 general error (see below) when the DSN points to a file through a mapped
 drive R:\file.mdb or an actual path \ \server\dir\dir\file.mdb
 {{{
 Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The 
 Microsoft
 Jet database engine cannot open the file '(unknown)'. It is already 
 opened
 exclusively by another user, or you need permission to view its data., 
 SQL
 state S1000 in SQLConnect in c:\apache\htdocs\www\php\tmpa2w9rldsv.php 
 on
 line 1
   }}}
 I have no passwords on this file and its not being used exclusively by
 anyone.

 Here is my PHP code:
 ?php $connect = odbc_connect(IDS,,);

 The IDS is of course a valid system DSN. I have used this DSN by 
 Crystal
 Reports with no problems. And i am not using the file when i do my PHP
 tests.

 There is no username or password in the DSN as i assume i do not need 
 one. I
 can only assume i have to pass some sort of authorization string with 
 the
 ODBC connect or i just cant do it this way. I've heard many things about
 using IIS for the server but I am using Apache on Win2k and don't wish 
 to
 change. If it matters the file i need to access is on a Win NT 4 server 
 but
 its just a shared folder with the correct permissions.




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