[PHP-DB] Does PHP work with Sybase ASA?

2001-09-06 Thread Davor Pleskina

I mean, is there in PHP support for Sybase Adaptive Server Anywhere, any
version, like for MySQL and some other databases?

Thanks.




-- 
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] Table Search ... HELP

2001-09-06 Thread Steve Cayford

All the info you want should be in $result after the query. But to get it
out of $result you need to access one row at a time with
mysql_fetch_array($result), which returns a numerically keyed array (if I
remember correctly), or mysql_fetch_assoc($result), which returns a string
keyed array or hash. So, like this (more or less)...

if ($TechContact == ""){
   $TechContact = '%';
}
$result = mysql_query ("SELECT * FROM enet
 WHERE TechContact LIKE '$TechContact%'");
// this part added...
while($row = mysql_fetch_assoc($result)){
print $row["TechContact"];
print $row["SomeOtherColumnName"];
print $row["YetAnotherColumnName"];
print "\n";
}


On 2001.09.06 19:41:55 -0500 Devon wrote:
> Below is an example of my code which searches a table and prints the
> result,
> the problem is that it only displays the TechContact where I want it to
> display all the fields that associated with it in that row off the colum
> eg.
> Mobile, AdminContact etc etc  Any suggestions?
> 
> if ($TechContact == "")
> {$TechContact = '%';}
> $result = mysql_query ("SELECT * FROM enet
>  WHERE TechContact LIKE '$TechContact%'");
> print $row["TechContact"];
> 
> 
> 
> 
> 
> -- 
> 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 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] Converting a FoxPro database to mySQL

2001-09-06 Thread Er Galvão Abbott

Is it possible?

Is there any ready php script that does that?

I only need the info that is stored in a DBF file - that I can easily
access trough PHP's DBF functions and the info stored in a FPT (???)
file.

And, oh, I need that the client uploads the files from time to time,
so that's why I asked for a resdy script. So I can trigger this script
every time the client uploads the files...

Please, folks tell me that there's a simple way to do it.

I'm strongly trying to avoid the use of ADODBC. I'm not saying that is
a bad thing, but I really prefer a Linux server than a MS one...

Please help.

Thanks in advance,



-- 
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] Backups, best practices

2001-09-06 Thread Beau Lebens

I run mostly on windoze machines and have used a couple different ways, some
dodgy, some not so dodgy :)

1. you can use a batch file to copy the data dir from inside mysql (dodgy)
2. you can use the cgi of PHP to make a quick mysqldump script and execute
that
3. i *think* you should be able to use a batch file to just run the
mysqldump exe with some command line parameters (never tried - would be
nice)

you can get command line zip/compression packages for windows, although for
*some* reason, as far as i know, not a command line version of winzip - the
big one!

anywho, all of those should be able to be scheduled using the "at" command
from DOS (good old DOS... the closest a microsoft weenie will come to heaven
(*nix) :P)

HTH

Beau

// -Original Message-
// From: Dan Brunner [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 7 September 2001 2:33 AM
// To: Jacob Singh
// Cc: [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] Backups, best practices
// 
// 
// Hey Hey Hey!!!
// 
// That depends on what system your running!?!?!?
// 
// I run LinuxPPC and use 3 ways
// 
// 1. Bru Tape back system
// 
// 2. At 12:00 AM the shell script runs and copies the files..
// 
// 3. Once a month I manually copy the files to a zip.
// 
// 
// Dan
// 
// 
// 
// PS WindowsGood luck.
// 
// 
// On Thursday, September 6, 2001, at 09:22 AM, Jacob Singh wrote:
// 
// > Hello,
// >
// >   I'm just wondering how everyone manages their MySQL backups, I'm
// >   looking for a better solution than manual.  any scripts 
// or example
// >   would be especially appreciated. tnks
// >
// > --
// > Best regards,
// >  Jacob Singh
// >  Pajama Design
// >  (413)582-9342
// >  2 Belanger Pl.
// >  Northampton, MA 01060
// >
// > mailto:[EMAIL PROTECTED]
// >
// >
// > --
// > 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 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 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] Table Search ... HELP

2001-09-06 Thread Devon

Below is an example of my code which searches a table and prints the result,
the problem is that it only displays the TechContact where I want it to
display all the fields that associated with it in that row off the colum eg.
Mobile, AdminContact etc etc  Any suggestions?

if ($TechContact == "")
{$TechContact = '%';}
$result = mysql_query ("SELECT * FROM enet
 WHERE TechContact LIKE '$TechContact%'");
print $row["TechContact"];





-- 
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 linux interbase Apache

2001-09-06 Thread Meir Kriheli

On Thursday 06 September 2001 18:47, Stephane MOREL wrote:
> Thank you for your answer
> Interbase is installed in /opt/interbase. I don't use --with-apxs.
> What I need now is to eanble connection to interbase through PHP.
> It seems to me I only need to compile PHP with the
> --with-interbase=/opt/interbase to create the file interbase.so.But I guess
> I'm wrong
> Thank you for your help


It all depends on how you install PHP (assuming you're using Apache)

--with-apache : static PHP compiled into apache (needs to cmpile Apache)
--with-apxs:  dynamic apache module (no need to compile Apache)
without any of them : compiled as a standalone cgi executable

As for compiling with interbase:
--with-interbase=/opt/interbase  won't create the interbase.so file, but 
rather compile PHP with interbase support built into it. 

If you want the shared interbase module (.so) you should compile with:

--with-interbase=shared,/opt/interbase

and modify your php.ini

I suggest you read the relevant pages in the manual. Find them at

http://www.php.net/manual/en/install.unix.php
http://www.php.net/manual/en/install.configure.php

-- 
Meir Kriheli

>
> steph
>
> Paul Cooper a écrit :
> > On Thu, Sep 06, 2001 at 03:38:18PM +0100, Stephane MOREL wrote:
> > > Thank you for your answer
> > > after a glance on the net I have found I need interbase.so. This is not
> > > present on my disk do you how can I retrieve it
> > > steph
> >
> > How and where did you intsall interbase - it's been a while so I forget.
> > I think the rpm version installs itself in /opt/interbase (you can check
> > with rpm -ql interbase). If that is the case then you need to configure
> > with
> >
> > ./configure --with-apxs=/path/to/apxs --with-interbase=/opt/interbase
> > --enable-track-vars
> >
> > Paul
> >
> > > Meir Kriheli a écrit :
> > > > On Thursday 06 September 2001 13:31, Stephane MOREL wrote:
> > > > > Hi all
> > > > > I'm new on PHP. I've installed PHP interbase Apache correctly. But
> > > > > I would like to connect Interbase database through PHP. So I enable
> > > > > interbase support for php by doing this :
> > > > > ./configure --with-interbase --with-apache --enabled-track-vars
> > > >
> > > > if you compile with --with-apache, you'll have to recompile apache
> > > > too. You can compile it as a shared module --with-apxs= > > > apxs>.
> > > >
> > > > Note: you'll need Apache development stuff (Depends on your distro).
> > > >
> > > > Any way after running make install make sure you've restarted Apache.
> > > >
> > > > > make
> > > > > make install
> > > > > Evreything works fine
> > > > > When I do this :
> > > > >  > > > > $conn=ibase_connect("192.168.2.2:/opt/interbase/examples/employee.g
> > > > >db", "SYSDBA", "masterkey");
> > > > > if (!$conn)
> > > > > { echo "Access Denied!";
> > > > > exit; }
> > > > > ?>
> > > > > my browser say :Call to undifined function :ibase_connect.
> > > > > I understood that I must enable the extension in php.ini. I think
> > > > > the extension was automatically added to my php.ini but I can not
> > > > > find any entry in php.ini for interbase.
> > > > > If someone could help
> > > > > TIA
> > > > >
> > > > > Steph
> > >
> > > --
> > > 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]
> >
> > --
> > -
> > Paul Cooper |  Tel: 0121 331 7858
> > Senior Programmer and Database Engineer |  Fax: 0121 331 7859
> > UCEcom  |  mailto:[EMAIL PROTECTED]
> > University of Central England   |  http://www.ucecom.com
> > Birmingham, B4 7DX  |
> > -

-- 
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] Backups, best practices

2001-09-06 Thread Dan Brunner

Hey Hey Hey!!!

That depends on what system your running!?!?!?

I run LinuxPPC and use 3 ways

1. Bru Tape back system

2. At 12:00 AM the shell script runs and copies the files..

3. Once a month I manually copy the files to a zip.


Dan



PS WindowsGood luck.


On Thursday, September 6, 2001, at 09:22 AM, Jacob Singh wrote:

> Hello,
>
>   I'm just wondering how everyone manages their MySQL backups, I'm
>   looking for a better solution than manual.  any scripts or example
>   would be especially appreciated. tnks
>
> --
> Best regards,
>  Jacob Singh
>  Pajama Design
>  (413)582-9342
>  2 Belanger Pl.
>  Northampton, MA 01060
>
> mailto:[EMAIL PROTECTED]
>
>
> --
> 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 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] stored procedure -- SQL Server 2k

2001-09-06 Thread bona

Hi,

does anybody know to call an SP on a SQL Server 2k???

thanks

Bona

__
Visite http://www.trama.com.br


-- 
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] Backups, best practices

2001-09-06 Thread Dreamvale

try mysqldump

- Original Message - 
From: "Jacob Singh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 10:22 PM
Subject: [PHP-DB] Backups, best practices


> Hello,
> 
>   I'm just wondering how everyone manages their MySQL backups, I'm
>   looking for a better solution than manual.  any scripts or example
>   would be especially appreciated. tnks
> 
> -- 
> Best regards,
>  Jacob Singh
>  Pajama Design 
>  (413)582-9342
>  2 Belanger Pl.
>  Northampton, MA 01060
> 
> mailto:[EMAIL PROTECTED]
> 
> 
> -- 
> 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 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] SQL combine to summations queries?

2001-09-06 Thread Bas Jobsen


> To do what I think you are trying to do you would use something like:
> Select sum(table1.fielda),sum(table2.fieldb) from table1 LEFT JOIN table2
ON
> table1.id=table2.id;

> if table1.fielda has more rows.
> If table2.fieldb has more rows use:
 the amount of rows is the same :)

> Select sum(table1.fielda),sum(table2.fieldb) from table2 LEFT JOIN table1
ON
> table1.id=table2.id;
>
> Hope that helps

Yes, it does, TNX!!!



-- 
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] SQL combine to summations queries?

2001-09-06 Thread Sheridan Saint-Michel

> Hello,
>
 > I don't understand the following, who can help?
>
 > I have got two queries:
> SELECT SUM(fielda) FROM table1
> and
> SELECT SUM(fieldb) FROM table2
>
> I thought this would be the same as:
> SELECT SUM(fielda.table1),SUM(fieldb.table2)   FROM table1, table2.
> But, itn't, why?
>
>
> Tnx,
>
> Bas Jobsen

You have to remember the table1,table2 is the same as table1 JOIN table2.
What does this mean?
Try this code and I think you will get a better idea of what is happening

Select table1.fielda,table2.fieldb from table1,table2;

Say table1.fielda is an int with values 1-5 and table2.fieldb is an int with
values 1-7.

The above Select would return 35 rows, because the join (,) tells it to
return a set with every combination
of fielda and fieldb (1,1 2,1 3,1 4,1 5,1 1,2 etc)  So

SELECT SUM(fielda.table1),SUM(fieldb.table2)   FROM table1, table2.

Will calculate every possible combination of fielda and fieldb and then give
you the sums of each column in that set
(105 and 140 in my example).  Does that make sense?

To do what I think you are trying to do you would use something like:
Select sum(table1.fielda),sum(table2.fieldb) from table1 LEFT JOIN table2 ON
table1.id=table2.id;

if table1.fielda has more rows.
If table2.fieldb has more rows use:

Select sum(table1.fielda),sum(table2.fieldb) from table2 LEFT JOIN table1 ON
table1.id=table2.id;

Hope that helps

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] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-06 Thread Rick Emery

nope.

see my previous reply
-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 10:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MYSQL/PHP what is the difference between unset()
and mysql_free_result() ?


> And how can i free the data-space from a string or somting like that?
> b.e.
> $string="a very long string";
> free($string);#?
> #could i use mysql_free_result($string);

Maybe I can  use: unset($string="");
or unset($array=array()); to free the data-space also




-- 
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 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] SQL combine to summations queries?

2001-09-06 Thread Tom Carter



> Hello,
> 
> I don't understand the following, who can help?
> 
> I have got two queries:
> SELECT SUM(fielda) FROM table1
> and
> SELECT SUM(fieldb) FROM table2
> 
> I thought this would be the same as:
> SELECT SUM(fielda.table1),SUM(fieldb.table2)   FROM table1, table2.
> But, itn't, why?

I think you mean table1.fielda rather than fielda.table1.

> Tnx,
> 
> Bas Jobsen
> 
> 
> -- 
> 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 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 combine to summations queries?

2001-09-06 Thread Bas Jobsen

Hello,

I don't understand the following, who can help?

I have got two queries:
SELECT SUM(fielda) FROM table1
and
SELECT SUM(fieldb) FROM table2

I thought this would be the same as:
SELECT SUM(fielda.table1),SUM(fieldb.table2)   FROM table1, table2.
But, itn't, why?

Tnx,

Bas Jobsen


-- 
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] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-06 Thread Bas Jobsen

> And how can i free the data-space from a string or somting like that?
> b.e.
> $string="a very long string";
> free($string);#?
> #could i use mysql_free_result($string);

Maybe I can  use: unset($string="");
or unset($array=array()); to free the data-space also




-- 
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] Backups, best practices

2001-09-06 Thread Tomas Garcia Ferrari

I use a script, written in Perl, that I run manually (but could be added to
a cron tab):

--- Starting of the script
#!/usr/bin/perl

print "Starting...\n";

### Some variables
$BASEDIR = "/home/backup";
$dump_path = "/usr/bin/mysqldump";
$date_path = "/bin/date"; # path to "date"
$date_format = "+%d%b%Y"; # dateformat ddMonYear for file name

$filedate = `$date_path $date_format`;
chomp($filedate);
$filedate =~ s/\s//g;  # no spaces in there (like on the 1st of the month)

# Dumping the databases
print "Dumping Databases...\n";
exec "mysqldump --all-databases --quick -uroot -p | gzip >
$BASEDIR/$filedate-MySQL.gz";

print "E finito!\n";
--- End of the script

This will ask you for the password of the user root (did you set this up? :)
) and pass the output to gzip that compress it. The final file is on the
directory '/home/backup' and named '010101-MySQL.gz' (if you run the script
the 1st of January of 2001).

Of course, you could go further and do it progresively... This is quick and
dirty, but it works! :)

Regards,
Tomás

> I'm just wondering how everyone manages their MySQL backups, I'm
> looking for a better solution than manual.  any scripts or example
> would be especially appreciated. tnks

+-- --+
   Tomás García Ferrari
   Bigital
   http://bigital.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] Backups, best practices

2001-09-06 Thread Jason Stechschulte

On Thu, Sep 06, 2001 at 10:22:51AM -0400, Jacob Singh wrote:
> I'm just wondering how everyone manages their MySQL backups, I'm
> looking for a better solution than manual.  any scripts or example
> would be especially appreciated. tnks

Here is a script I use:

#!/usr/bin/perl

$now = time;
$directory = "/home/user/backups";

# these are the databases I back up
@databases = ("mysql", "accounts", "data");

foreach $database (@databases) {
   $backup = "mysqldump \-\-add-drop-table -u user -ppass $database";
   $zip = "| gzip > $directory/$database.$now.gz";
   system("$backup $zip");

# This stays commented, because I don't want to restore all the time.
#   unless($database eq "mysql") {
#  $restore = "|mysql -u user -ppass test_$database";
#  system("$backup $restore");
#   }
}


# This allows me to keep 7 copies of the backups at all times.
# They also get backed up to tape, but this is more convenient for me.
opendir BACKUPS, $directory;
foreach $file (readdir BACKUPS) {
   if(-M "$directory/$file" > 6) {
  unlink "$directory/$file";
   }
}


-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
Let's say the docs present a simplified view of reality...:-)
 -- Larry Wall in  <[EMAIL PROTECTED]>

-- 
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 linux interbase Apache

2001-09-06 Thread Stephane MOREL

Thank you for your answer
Interbase is installed in /opt/interbase. I don't use --with-apxs.
What I need now is to eanble connection to interbase through PHP.
It seems to me I only need to compile PHP with the --with-interbase=/opt/interbase to
create the file interbase.so.But I guess I'm wrong
Thank you for your help

steph

Paul Cooper a écrit :

> On Thu, Sep 06, 2001 at 03:38:18PM +0100, Stephane MOREL wrote:
> > Thank you for your answer
> > after a glance on the net I have found I need interbase.so. This is not present
> > on my disk do you how can I retrieve it
> > steph
>
> How and where did you intsall interbase - it's been a while so I forget.
> I think the rpm version installs itself in /opt/interbase (you can check
> with rpm -ql interbase). If that is the case then you need to configure
> with
>
> ./configure --with-apxs=/path/to/apxs --with-interbase=/opt/interbase
> --enable-track-vars
>
> Paul
>
> > Meir Kriheli a écrit :
> >
> > > On Thursday 06 September 2001 13:31, Stephane MOREL wrote:
> > > > Hi all
> > > > I'm new on PHP. I've installed PHP interbase Apache correctly. But I
> > > > would like to connect Interbase database through PHP. So I enable
> > > > interbase support for php by doing this :
> > > > ./configure --with-interbase --with-apache --enabled-track-vars
> > >
> > > if you compile with --with-apache, you'll have to recompile apache too. You
> > > can compile it as a shared module --with-apxs=.
> > >
> > > Note: you'll need Apache development stuff (Depends on your distro).
> > >
> > > Any way after running make install make sure you've restarted Apache.
> > >
> > > > make
> > > > make install
> > > > Evreything works fine
> > > > When I do this :
> > > >  > > > $conn=ibase_connect("192.168.2.2:/opt/interbase/examples/employee.gdb",
> > > > "SYSDBA", "masterkey");
> > > > if (!$conn)
> > > > { echo "Access Denied!";
> > > > exit; }
> > > > ?>
> > > > my browser say :Call to undifined function :ibase_connect.
> > > > I understood that I must enable the extension in php.ini. I think the
> > > > extension was automatically added to my php.ini but I can not find any
> > > > entry in php.ini for interbase.
> > > > If someone could help
> > > > TIA
> > > >
> > > > Steph
> >
> >
> > --
> > 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]
>
> --
> -
> Paul Cooper |  Tel: 0121 331 7858
> Senior Programmer and Database Engineer |  Fax: 0121 331 7859
> UCEcom  |  mailto:[EMAIL PROTECTED]
> University of Central England   |  http://www.ucecom.com
> Birmingham, B4 7DX  |
> -


-- 
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] Backups, best practices

2001-09-06 Thread Jacob Singh

Hello,

  I'm just wondering how everyone manages their MySQL backups, I'm
  looking for a better solution than manual.  any scripts or example
  would be especially appreciated. tnks

-- 
Best regards,
 Jacob Singh
 Pajama Design 
 (413)582-9342
 2 Belanger Pl.
 Northampton, MA 01060

mailto:[EMAIL PROTECTED]


-- 
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 linux interbase Apache

2001-09-06 Thread Paul Cooper

On Thu, Sep 06, 2001 at 03:38:18PM +0100, Stephane MOREL wrote:
> Thank you for your answer
> after a glance on the net I have found I need interbase.so. This is not present
> on my disk do you how can I retrieve it
> steph

How and where did you intsall interbase - it's been a while so I forget. 
I think the rpm version installs itself in /opt/interbase (you can check 
with rpm -ql interbase). If that is the case then you need to configure 
with

./configure --with-apxs=/path/to/apxs --with-interbase=/opt/interbase 
--enable-track-vars

Paul

> Meir Kriheli a écrit :
> 
> > On Thursday 06 September 2001 13:31, Stephane MOREL wrote:
> > > Hi all
> > > I'm new on PHP. I've installed PHP interbase Apache correctly. But I
> > > would like to connect Interbase database through PHP. So I enable
> > > interbase support for php by doing this :
> > > ./configure --with-interbase --with-apache --enabled-track-vars
> >
> > if you compile with --with-apache, you'll have to recompile apache too. You
> > can compile it as a shared module --with-apxs=.
> >
> > Note: you'll need Apache development stuff (Depends on your distro).
> >
> > Any way after running make install make sure you've restarted Apache.
> >
> > > make
> > > make install
> > > Evreything works fine
> > > When I do this :
> > >  > > $conn=ibase_connect("192.168.2.2:/opt/interbase/examples/employee.gdb",
> > > "SYSDBA", "masterkey");
> > > if (!$conn)
> > > { echo "Access Denied!";
> > > exit; }
> > > ?>
> > > my browser say :Call to undifined function :ibase_connect.
> > > I understood that I must enable the extension in php.ini. I think the
> > > extension was automatically added to my php.ini but I can not find any
> > > entry in php.ini for interbase.
> > > If someone could help
> > > TIA
> > >
> > > Steph
> 
> 
> -- 
> 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]

-- 
-
Paul Cooper |  Tel: 0121 331 7858
Senior Programmer and Database Engineer |  Fax: 0121 331 7859
UCEcom  |  mailto:[EMAIL PROTECTED]
University of Central England   |  http://www.ucecom.com
Birmingham, B4 7DX  |
-

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

2001-09-06 Thread Paolo

Some does know ho to get column list using ODBC_COLUMNS functions?



-- 
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 linux interbase Apache

2001-09-06 Thread Stephane MOREL

Thank you for your answer
after a glance on the net I have found I need interbase.so. This is not present
on my disk do you how can I retrieve it
steph

Meir Kriheli a écrit :

> On Thursday 06 September 2001 13:31, Stephane MOREL wrote:
> > Hi all
> > I'm new on PHP. I've installed PHP interbase Apache correctly. But I
> > would like to connect Interbase database through PHP. So I enable
> > interbase support for php by doing this :
> > ./configure --with-interbase --with-apache --enabled-track-vars
>
> if you compile with --with-apache, you'll have to recompile apache too. You
> can compile it as a shared module --with-apxs=.
>
> Note: you'll need Apache development stuff (Depends on your distro).
>
> Any way after running make install make sure you've restarted Apache.
>
> > make
> > make install
> > Evreything works fine
> > When I do this :
> >  > $conn=ibase_connect("192.168.2.2:/opt/interbase/examples/employee.gdb",
> > "SYSDBA", "masterkey");
> > if (!$conn)
> > { echo "Access Denied!";
> > exit; }
> > ?>
> > my browser say :Call to undifined function :ibase_connect.
> > I understood that I must enable the extension in php.ini. I think the
> > extension was automatically added to my php.ini but I can not find any
> > entry in php.ini for interbase.
> > If someone could help
> > TIA
> >
> > Steph


-- 
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] MYSQL/PHP what is the difference between unset() and mysql_free_result() ?

2001-09-06 Thread Rick Emery

You free-up the dataspace pointed-to by $string with unset().  PHP knows
that this variable points-to character data or numeric or whatever.  unset()
then releases the dataspace held by the $string itself and erases its name
from the symbol table.

Using mysql_free_result($string) will not work because $string does not
point-to a result returned from a mysql_query().  After executing
mysql_free_result($result), $result still exists in the symbol table.  You
would have to unset($result) to delete the pointer itself.

-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 4:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MYSQL/PHP what is the difference between unset()
and mysql_free_result() ?


Hello,

> unset() simply deletes the pointer to the data without releasing the space
> held by the data.
> mysql_free_result() releases the data storage pointed-to by the $result
> pointer.
> This is important because $result could be pointing-to a dataspace
> containing a large number or rows returned by the mysql_query().  You WANT
> to recover this dataspace.

Well, oke, tnx. But if unset() doesn't releas the data-space, what then is
it's functionality?
only voor tests like: if(isset($var)) ;?

And how can i free the data-space from a string or somting like that?
b.e.
$string="a very long string";
free($string);#?
#could i use mysql_free_result($string);

Tnx,

Bas


-- 
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 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 linux interbase Apache

2001-09-06 Thread Meir Kriheli

On Thursday 06 September 2001 13:31, Stephane MOREL wrote:
> Hi all
> I'm new on PHP. I've installed PHP interbase Apache correctly. But I
> would like to connect Interbase database through PHP. So I enable
> interbase support for php by doing this :
> ./configure --with-interbase --with-apache --enabled-track-vars

if you compile with --with-apache, you'll have to recompile apache too. You 
can compile it as a shared module --with-apxs=.

Note: you'll need Apache development stuff (Depends on your distro).

Any way after running make install make sure you've restarted Apache.

> make
> make install
> Evreything works fine
> When I do this :
>  $conn=ibase_connect("192.168.2.2:/opt/interbase/examples/employee.gdb",
> "SYSDBA", "masterkey");
> if (!$conn)
> { echo "Access Denied!";
> exit; }
> ?>
> my browser say :Call to undifined function :ibase_connect.
> I understood that I must enable the extension in php.ini. I think the
> extension was automatically added to my php.ini but I can not find any
> entry in php.ini for interbase.
> If someone could help
> TIA
>
> Steph

-- 
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: Newbie Help: Searching

2001-09-06 Thread Steve Brett

have 2 vars $Tech and $Admin and then chnage you SQL so it says:

>$Query = "SELECT * FROM enet WHERE TechContact LIKE '%$Tech%' AND
AdminContact
LIKE '%$Admin%'";

Steve

"Devon" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $Query = "SELECT * FROM enet WHERE TechContact LIKE '%' AND AdminContact
> LIKE '%'";
>
> This query simply prints out my entire tables, is there a way using PHP so
I
> can make the '%' a user input so they can search the table under those
> fields.
>
> Cheers
>
>



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

2001-09-06 Thread Paul Gardiner

Hi there,

Take a look at the following snippet below. It is similar to what you're
looking for without having to bugger about duplicating loads of lines for
each store. Just add a new one to the array if required.

Best Regards,
- Paul -


";
echo "$MonthName";
  }

?>



- Original Message -
From: "Steve Cayford" <[EMAIL PROTECTED]>
To: "Jeff Grossman" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001 11:36 PM
Subject: Re: [PHP-DB] Forms Question


>
> On Wednesday, September 5, 2001, at 04:50  PM, Jeff Grossman wrote:
>
> > Hello,
> > Here is the code I have:
> >
> > while ($row=mysql_fetch_array($result)) {
> >$store=$row["store"];
> >$jobdesc=$row["jobdesc"];
> > echo "";
> > echo "Store:
> >   
> >  Signal Hill
> >  Reseda
> >  Orange
> >  West Covina
> >  Riverside
> >  Norwalk
> >  Fountain Valley
> >  Pasadena
> >  Redondo Beach
> >  San Bernardino
> >  Kearny Mesa
> >  San Marcos
> >  Chino
> >  Corporate Office
> >   ";
> > echo " > VALUE=\"$jobdesc\">";
> > echo " > Changes\">";
> > }
> >
> >
> > Is want I am trying to do possible?  I want the value which is stored in
> > $store to automatically fill in on the drop down list.  But, for some
> > reason it is defaulting to the first option, and not using the value
> > that is in the database.
> >
> > Can I use a drop down menu, or should I just go to radio buttons?
> >
> > Thanks,
> > Jeff
>
> If I understand your question...
>
> In order to have your value preset in the drop down list you need
> indicate that with
> blahblah
>
> What I've been using for this is a hash like this:
>
> while ($row=mysql_fetch_array($result)) {
> $selected = array();
> $selected[$row["store"]] = "selected";
> $store=$row["store"];
> $jobdesc=$row["jobdesc"];
> echo "";
> echo "Store:";
> echo ""
> echo "   Hill"] . ">Signal Hill";
> echo "   ">Reseda";
> ...etc, etc., etc.
>
> something along those lines, anyway. So, if $row["store"] == "Signal
> Hill", then $selected["Signal Hill"] will be set to "selected", while
> $selected["Reseda"] and all the others will be blank.
>
> This is a very keen thing about php.
>
> -Steve
>
>
> --
> 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 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] PHP linux interbase Apache

2001-09-06 Thread Stephane MOREL

Hi all
I'm new on PHP. I've installed PHP interbase Apache correctly. But I
would like to connect Interbase database through PHP. So I enable
interbase support for php by doing this :
./configure --with-interbase --with-apache --enabled-track-vars
make
make install
Evreything works fine
When I do this :

my browser say :Call to undifined function :ibase_connect.
I understood that I must enable the extension in php.ini. I think the
extension was automatically added to my php.ini but I can not find any
entry in php.ini for interbase.
If someone could help
TIA

Steph


-- 
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] mssql update adds blank to record

2001-09-06 Thread Stephan Nimtz

thanks, this helped 

> Try
>
> ltrim($Device_Name);
>
> before running query
>
> Bartek Pawlik
>
> - Original Message -
> From: Stephan Nimtz <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 06, 2001 10:21 AM
> Subject: [PHP-DB] mssql update adds blank to record
>
>
> > can anyone help me ???
> >
> > the command:
> >
> > mssql_query("UPDATE IP_Host
> >   SET Device_Name='$Device_Name',
> >Device_Owner='$Device_Owner',
> >Description='$Description'
> >   WHERE ID=$ID");
> >
> > creates always a  blank character at the first position of the record.
> >
> > how can i get rid of that ???
> >
> > thx stephan
> >
> >
> >
> > --
> > 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]
> >
>
>
>
> --
>
> OnetKomunikator - porozumiesz sie
> z innymi [ http://ok.onet.pl/instaluj.html ]
>



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




Odp: [PHP-DB] mssql update adds blank to record

2001-09-06 Thread Bartek Pawlik

Try

ltrim($Device_Name);

before running query

Bartek Pawlik

- Original Message - 
From: Stephan Nimtz <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 06, 2001 10:21 AM
Subject: [PHP-DB] mssql update adds blank to record


> can anyone help me ???
> 
> the command:
> 
> mssql_query("UPDATE IP_Host
>   SET Device_Name='$Device_Name',
>Device_Owner='$Device_Owner',
>Description='$Description'
>   WHERE ID=$ID");
> 
> creates always a  blank character at the first position of the record.
> 
> how can i get rid of that ???
> 
> thx stephan
> 
> 
> 
> -- 
> 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]
> 



-- 

OnetKomunikator - porozumiesz sie
z innymi [ http://ok.onet.pl/instaluj.html ]


-- 
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] mssql update adds blank to record

2001-09-06 Thread Stephan Nimtz

can anyone help me ???

the command:

mssql_query("UPDATE IP_Host
  SET Device_Name='$Device_Name',
   Device_Owner='$Device_Owner',
   Description='$Description'
  WHERE ID=$ID");

creates always a  blank character at the first position of the record.

how can i get rid of that ???

thx stephan



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