Good ideas needed - a.s.a.p.

This is a discussion on Good ideas needed - a.s.a.p. within the PHP Language forums, part of the PHP Programming Forums category; Hi. sorry for the stinger title - I need to know as quickly as possible if and where and when it ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-02-2003
Wesley Parish
 
Posts: n/a
Default Good ideas needed - a.s.a.p.

Hi. sorry for the stinger title - I need to know as quickly as possible if
and where and when it might be possible to set up a php script to read the
date and/or time, pass the variables on to another part of the script, and
call an SQL script to delete the variables for that particular row?

I don't know much about php and mySQL, the only thing I've learnt so far is
that php looks a lot like C and Perl and I've got some books on the full
SQL standard so my problem with that is not knowing just where mySQL
diverges...

Any help will be gratefully received.

Thanks.

Wesley Parish
--
First the wife, tone of awe. So much a condition. Kent in the labs, fast
forward. "So how was the worthlessful businessman?" But they hadn't
stopped meat for year ago, that arose hotel facade slowly moved apper.
- Don't let emacs meta-x dissociatedpress write your speeches!
Reply With Quote
  #2 (permalink)  
Old 10-02-2003
David Robley
 
Posts: n/a
Default Re: Good ideas needed - a.s.a.p.

In article <1QUeb.5832$tv1.630078@news02.tsnz.net>,
wes.parish@paradise.net.nz says...
> Hi. sorry for the stinger title - I need to know as quickly as possible if
> and where and when it might be possible to set up a php script to read the
> date and/or time, pass the variables on to another part of the script, and
> call an SQL script to delete the variables for that particular row?
>
> I don't know much about php and mySQL, the only thing I've learnt so far is
> that php looks a lot like C and Perl and I've got some books on the full
> SQL standard so my problem with that is not knowing just where mySQL
> diverges...
>
> Any help will be gratefully received.
>
> Thanks.
>
> Wesley Parish


If - yes, it's possible; where - depends on where you have the required
software/hardware to run it; when - as soon as you start.

You might want to look at the date/time functions and using the resultant
values in a SQL query.

If you have a more specific query, come back to us.

Cheers
--
Quod subigo farinam

$email =~ s/oz$/au/o;
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?
Reply With Quote
  #3 (permalink)  
Old 10-02-2003
Jordan Smith
 
Posts: n/a
Default Re: Good ideas needed - a.s.a.p.

David Robley <robleyd[spam]@ozemail.com.au> wrote in message news:<MPG.19e6c2d126304d8c9896ea@news.spiderweb.co m.au>...
> In article <1QUeb.5832$tv1.630078@news02.tsnz.net>,
> wes.parish@paradise.net.nz says...
> > Hi. sorry for the stinger title - I need to know as quickly as possible if
> > and where and when it might be possible to set up a php script to read the
> > date and/or time, pass the variables on to another part of the script, and
> > call an SQL script to delete the variables for that particular row?
> >
> > I don't know much about php and mySQL, the only thing I've learnt so far is
> > that php looks a lot like C and Perl and I've got some books on the full
> > SQL standard so my problem with that is not knowing just where mySQL
> > diverges...
> >
> > Any help will be gratefully received.
> >
> > Thanks.
> >
> > Wesley Parish

>
> If - yes, it's possible; where - depends on where you have the required
> software/hardware to run it; when - as soon as you start.
>
> You might want to look at the date/time functions and using the resultant
> values in a SQL query.
>
> If you have a more specific query, come back to us.
>
> Cheers



this is VERY easy... you make it sound so hard ;)

First, get the time using time()
so:
<?
$time=time();

//then run the mySQL query:

mysql_query(DELETE FROM tablename WHERE time_field = $time")

?>
Reply With Quote
  #4 (permalink)  
Old 10-03-2003
Wesley Parish
 
Posts: n/a
Default Re: Good ideas needed - a.s.a.p.

Jordan Smith wrote:

> David Robley <robleyd[spam]@ozemail.com.au> wrote in message
> news:<MPG.19e6c2d126304d8c9896ea@news.spiderweb.co m.au>...
>> In article <1QUeb.5832$tv1.630078@news02.tsnz.net>,
>> wes.parish@paradise.net.nz says...
>> > Hi. sorry for the stinger title - I need to know as quickly as
>> > possible if and where and when it might be possible to set up a php
>> > script to read the date and/or time, pass the variables on to another
>> > part of the script, and call an SQL script to delete the variables for
>> > that particular row?
>> >
>> > I don't know much about php and mySQL, the only thing I've learnt so
>> > far is that php looks a lot like C and Perl and I've got some books on
>> > the full SQL standard so my problem with that is not knowing just where
>> > mySQL diverges...
>> >
>> > Any help will be gratefully received.
>> >
>> > Thanks.
>> >
>> > Wesley Parish

>>
>> If - yes, it's possible; where - depends on where you have the required
>> software/hardware to run it; when - as soon as you start.
>>
>> You might want to look at the date/time functions and using the resultant
>> values in a SQL query.
>>
>> If you have a more specific query, come back to us.
>>
>> Cheers

>
>
> this is VERY easy... you make it sound so hard ;)
>
> First, get the time using time()
> so:
> <?
> $time=time();
>
> //then run the mySQL query:
>
> mysql_query(DELETE FROM tablename WHERE time_field = $time")
>
> ?>

Thanks heaps! I'll get right onto it!

Wesley Parish
--
First the wife, tone of awe. So much a condition. Kent in the labs, fast
forward. "So how was the worthlessful businessman?" But they hadn't
stopped meat for year ago, that arose hotel facade slowly moved apper.
- Don't let emacs meta-x dissociatedpress write your speeches!
Reply With Quote
  #5 (permalink)  
Old 10-04-2003
Tim Tyler
 
Posts: n/a
Default Re: Good ideas needed - a.s.a.p.

Wesley Parish <wes.parish@paradise.net.nz> wrote or quoted:

> I don't know much about php and mySQL, the only thing I've learnt so far is
> that php looks a lot like C and Perl and I've got some books on the full
> SQL standard so my problem with that is not knowing just where mySQL
> diverges...


PHP looks a /lot/ like C/C++.

I had *hoped* we had got away from all those "::" and "->" back in 1995
(when Java came out) - but it looks like the hangover is proving to be
a persistent one :-(
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:26 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0