[PHP-DB] php with IIS

2007-03-08 Thread Harpreet

Is there a way to run our PHP pages through Microsoft's IIS?

Regards,
Harpreet Kaur


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



Re: [PHP-DB] Re: subtracting one query from the other

2002-07-01 Thread Harpreet Kaur

Thanks for ur response. I used the approach as below and it worked much 
faster and reduced the execution time by 5 times. I concatenated the 3 
fields i wanted to compare and used it as the id. But the query still takes 
like 3 minutes. Earlier it used to take 12 minutes.  Can I optimise it any 
further. Please help. My query is as follows:

SELECT distinct a.playlist,a.material_id,a.destination_locator, 
a.destination,a.air_time,a.traffic_duration,a.comment,a.title,
a.device_name,a.source_locator,a.source from record1 a left outer join 
record2 b on 
a.material_id+a.destination_locator+a.device_name=b.material_id+b.destination_locator+b.device_name
where b.material_id+b.destination_locator+b.device_name is null

help is greatly appreciated.

regards,
harpreet

>From: Dan Koken <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [PHP-DB] Re: subtracting one query from the other
>Date: Thu, 27 Jun 2002 05:24:41 -0700
>
>Not sure what your data looks like or what exactly you are trying to do.
>But what is wrong with the old standard compare for NULL. Something like
>--
>SELECT
>first_record.id  as first_id,
>second_record.id as second_id
>FROM  second_record
>LEFT JOIN first_record
>ON   first_record.id = second_record.id
>ORDER BY something
>HAVING first_id = NULL
>
>Here only the second_records will be selected if there is no matching
>first_record.
>
>HTH.. Good luck .. Dan
>-
>
>Harpreet Kaur wrote:
>
>>Please help, I am stuck and my mind is frozen.
>>
>>I want to subtrack one query from the other. I have one query that
>>brings all the records. The second gets another set of records.
>>I want to subtract the second query from the first one . How do i do this?
>>
>>First query produces like 1000 records. Second has like 800 records i
>>want to display the other 200 that dont exist in the first query.
>>
>>Please help.
>>
>>I have this but it is too slow and doesnt work in php but does in mssql.
>>select distinct a.playlist,
>> a.material_id,
>> a.destination_locator,
>> a.destination,
>> a.air_time,
>> a.traffic_duration,
>> a.comment,
>> a.title,
>> a.device_name,
>> m.media_locator as source_locator,
>> m.medium_name as source
>>from cch_dubber_dublist_view11 a left outer join lib_copy_view m
>>on a.material_id=m.material_id where (A.material_id is not null) and
>>(A.material_id <>'')
>>and
>>  NOT EXISTS (
>>select null
>>from
>>   dev_device_view d
>>inner join
>> lib_copy_view c
>>on
>> d.device_name= c.medium_name
>>where
>>c.material_id = a.material_id
>>AND c.media_locator = a.destination_locator
>>AND d.device_name = a.device_name
>>)
>>
>>
>>
>>
>>_
>>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP-DB] subtracting one query from the other

2002-06-26 Thread Harpreet Kaur

Please help, I am stuck and my mind is frozen.

I want to subtrack one query from the other. I have one query that brings 
all the records. The second gets another set of records.
I want to subtract the second query from the first one . How do i do this?

First query produces like 1000 records. Second has like 800 records i want 
to display the other 200 that dont exist in the first query.

Please help.

I have this but it is too slow and doesnt work in php but does in mssql.
select distinct a.playlist,
a.material_id,
a.destination_locator,
a.destination,
a.air_time,
a.traffic_duration,
a.comment,
a.title,
a.device_name,
m.media_locator as source_locator,
m.medium_name as source
from cch_dubber_dublist_view11 a left outer join lib_copy_view m
on a.material_id=m.material_id where (A.material_id is not null) and 
(A.material_id <>'')
and
  NOT EXISTS (
select null
from
   dev_device_view d
inner join
 lib_copy_view c
on
 d.device_name= c.medium_name
where
c.material_id = a.material_id
AND c.media_locator = a.destination_locator
AND d.device_name = a.device_name
)




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: [PHP-DB] cron job and php

2002-04-16 Thread Harpreet Kaur

Thanks Lisi. The use of php in front of the path made 
/home/harpreet/crontest.php run one time when run from the telnet prompt. 
But it still doesnt run from the crontab. I created a mycron.txt file with 
the below statement. The put crontab mysql.txt to specify the cron. But it 
doesnt seem to run this way. What am i doing wrong. Please help.

Help is appreciated.

Regards,
harpreet kaur



>From: Lisi <[EMAIL PROTECTED]>
>To: "Harpreet Kaur" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: Re: [PHP-DB] cron job and php
>Date: Tue, 16 Apr 2002 19:13:11 +0200
>
>Try */1 * * * * php /home/harpreet/crontest.php
>
>or */1 * * * * php ~/crontest.php
>
>~ means your home directory.
>
>I think this should work, every minute.
>
>-Lisi
>
>
>At 03:54 PM 4/16/02 +, Harpreet Kaur wrote:
>>Can i run a php page using a crontab job. I am trying to do so but no
>>luck. My cron job statement is :
>>* * * * * lynx /home/harpreet/crontest.php
>>
>>Actually i want to run a script every 10 minutes to do some background job
>>like we do in sql server. How can i do it with mysql and php.
>>
>>Help is appreciated,
>>
>>regards,
>>Harpreet Kaur
>>
>>_
>>Get your FREE download of MSN Explorer at 
>>http://explorer.msn.com/intl.asp.
>>
>>
>>--
>>PHP Database Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP-DB] cron job and php

2002-04-16 Thread Harpreet Kaur

Can i run a php page using a crontab job. I am trying to do so but no luck. 
My cron job statement is :
* * * * * lynx /home/harpreet/crontest.php

Actually i want to run a script every 10 minutes to do some background job 
like we do in sql server. How can i do it with mysql and php.

Help is appreciated,

regards,
Harpreet Kaur

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




[PHP-DB] Run php page automatically

2001-12-20 Thread Harpreet

I would like to create a php page that would automatically run every 10
minutes or so to delete records from a table. This table has an expiration
field and records r tested by comparing current date with the expiration
date and record is deleted if expired.

Is this possible.

Help is greatly appreciated.

I am using php for my application. I am working on a LInux server and using
mysql as my database.

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.




-- 
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] MYSQL query help

2001-12-14 Thread Harpreet

I dont think we can use 'IN' and 'NOT IN' in mysql. Is there an alternative
that would work?

select * from lib_asset_tbl where material_id <>'' and asset_id in (select
asset_id from lib_copy_tbl)

Help is appreciated.

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-- 
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] working with views

2001-12-06 Thread Harpreet

The following worked in MSSQL as it could handle views.

Now i want to run it in  PHP with a mysql server. I was wondering if there
is another alternative for the below then to use temporary tables.

select * from  dev_device_view b inner join cch_playlist_view a on
b.source_name =a.video_source

where dev_device_view and cch_playlist_views are sql statements joining 2
tables using an inner join.

Help is appreciated,

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.




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

2001-11-26 Thread Harpreet

I tried doing the following it still deosnt work

http://123.345.567.789/frame_main.htm";);
}
  else
{
header("Location: http://123.345.567.789/notlogged.htm";); 
} 
?>

How do i check for a valid connection??

He;p is appreciated,

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.


-Original Message-
From: Indioblanco [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 9:59 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Authenticate problem


Two things right off the top:
1. You won't execute the header functions if you exit (die) the script.
2. Your header functions won't work if you allow warnings to print..

Try testing for a valid connection, then passing the error string into 
the redirection url of a header call if it returns false and then exit.

-ib



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

2001-11-21 Thread Harpreet

Dear list members,

I have  login page which passes the user name to the next screen. If the
user is correct i want to direct him to the actual application. If not right
then i want to display a notlogged page. I am doing the following.
http://192.168.200.98/frame_main.htm";);
}
  else
{
 header("Location: http://192.168.200.98/notlogged.htm";);
}

It works fine if the user is right and takes the suer to the application.
But if i type in a user not allowed it gives me the following error and does
not direct to the notlogged page.

Warning: MySQL Connection Failed: Access denied for user:
'[EMAIL PROTECTED]' (Using password: NO) in /var/www/html/scripts/login.php
on line 4
Error on connection string.


How can i skip that message and send the user to the not logged page??

Please help.

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



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

2001-11-14 Thread Harpreet

Do we have a matching command for rs.movelast in PHP to get the data in the
last record of the array

$row=mysql_fetch_array($result);

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-- 
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] JOBS in mysql

2001-11-07 Thread Harpreet

I have run JOBs in sql server and was wondering if we have ne thign similar
in mysql or use PHP to write a script that would automatically run every 10
minutes.

Help is apppreciated.

Regards,

Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-- 
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] Alternative for Union in MYSQL

2001-10-31 Thread Harpreet

I had a view on sqlserver which i am trying to convert to work with mysql.
It uses a union which i believe does not work with mysql. What is another
alternative for union.

Sql with union:

select a.asset_id,a.material_id,b.material_id as parent_material_id from
lib_asset_tbl a inner join lib_asset_tbl b on a.parent_id=b.asset_id
union
select asset_id,material_id,'' from lib_asset_tbl where virtual_flag='N'

Help is appreciated,
Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.


-- 
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] New users on mysql using php

2001-10-25 Thread Harpreet

I do have root access and run the Grant command in Telnet.

But what i want to do is have a web page called add_user.php. When the
administartor adds a username and password i want that user to be granted
all rights. I eman can i run the Grant statement in my php page and not on
Telnet.

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 4:57 PM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] New users on mysql using php


Do you have root access to mysql?  If so, then you can GRANT privileges to
create new users.
Otherwise, you have only the GRANT privileges delegated to you by the MySQL
admin.

-Original Message-----
From: Harpreet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 25, 2001 4:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] New users on mysql using php


I connect to mysql database using the following:

$StrConnectionUser=mysql_connect(ipaddress,"$USER");
mysql_select_db(database name, $StrConnectionUser);

My question is how can I add new users to mysql using the web interface.
Like can i run the Grant and revoke (mysql commands)  in my php page??

This way i can add or delete users that can have access to the mysql
database through the web.
I hope the above makes sense.

Thanks,
Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



--
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] New users on mysql using php

2001-10-25 Thread Harpreet

I connect to mysql database using the following:

$StrConnectionUser=mysql_connect(ipaddress,"$USER");
mysql_select_db(database name, $StrConnectionUser);

My question is how can I add new users to mysql using the web interface.
Like can i run the Grant and revoke (mysql commands)  in my php page??

This way i can add or delete users that can have access to the mysql
database through the web.
I hope the above makes sense.

Thanks,
Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



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

2001-10-24 Thread Harpreet

I am using concat in my sql and it runs fine on mysql client. But when used
in php it gives me an error:
Supplied argument is not a valid MySQL result resource in
/var/www/html/scripts/cfg_code_delete.php on line <


$ssql="select concat(category, "-", code) as fill_column, code_id as
submit_column from sys_code_tbl order by category";
echo "";
$result = mysql_query($ssql);
while ($row = mysql_fetch_array($result))
  {
  echo "'".$row["fill_column"]."'";
  }

Help is appreciated.

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.


-- 
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] Creating a file using php

2001-10-22 Thread Harpreet

Blunt: NO!!! Duh

Polite: Well its easier to post and get a reply rather then me going and
serching fo it.;)

regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



-Original Message-
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 12:59 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Creating a file using php


Harpreet,

Blunt: Do you ever check the PHP manual before posting?

Polite: XXVI. Filesystem functions
http://www.php.net/manual/en/ref.filesystem.php

=dn


- Original Message -
From: "Harpreet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 22 October 2001 17:34
Subject: [PHP-DB] Creating a file using php


> Is there a command in PHP that can create a textfile and allows writing
data
> to it dynamically? Can someone point me to a tutorial or site .
>
> Thanks in advance, help is appreciated.
>
> Regards,
> Harpreet Kaur
> Software Developer
> Crispin Corporations Inc.
>
>
>
> --
> 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] Creating a file using php

2001-10-22 Thread Harpreet

Is there a command in PHP that can create a textfile and allows writing data
to it dynamically? Can someone point me to a tutorial or site .

Thanks in advance, help is appreciated.

Regards,
Harpreet Kaur
Software Developer
Crispin Corporations Inc.



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