Jump to content

redneonrt

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Posts posted by redneonrt

  1. Quick question,

     

    When I run the code below I get an undefined index error for the array.  If I define all the indexes I have no problem making it work correctly.  I thought writing it like I did below would define the indexes as they are needed.  What am I doing wrong?

     

    Thanks for looking,

     

    $call_data = array();
    
    if($call_segment['did_digits'] == '3300'){
    			//Check if call was answered
    			if($call_segment['answered'] == 'No'){
    				$call_data['3300']['abandoned'] ++;
    			}
    			else{
    				if(in_array($call_segment['finished_on'],$phoneroom_ext)){
    					$call_data['3300']['phoneroom'] ++;
    				}
    				elseif(in_array($call_segment['finished_on'],$anoka_ext)){
    					$call_data['3300']['store'] ++;
    				}
    			}
    		}

  2. Hello All,

     

    I'll try and explain this the best I can...

     

    I have a php/mysql application in place that i use to track where my delivery drivers are.  Basicly the driver selects where s/he is at and whether s/he is arriving or departing and the info get recorded into the db.  There is a set schedule the drivers follow and I am trying to think of a way track their deviation from the schedule and also see when the next truck should be arriving, possible even taking into account if they are running late or early.

     

    For Example:

    Osseo8:00am

    Anoka9:00am

    SLP9:30am

    PL10:00am

    DC11:00am

    Osseo12:00pm

    Anoka1:00pm

    SLP1:30pm

    PL2:00pm

    DC3:00pm

    Osseo4:00pm

    Anoka5:00pm

    SLP5:30pm

    PL6:00pm

    DC7:00pm

     

    Lets say its 10:23 am and I want to know when the next truck will arrive if I am in Osseo and whether or not s/he is running behind or head of schedule and a possible ETA.

     

    Can anyone point me in the general direction of where to start? Also in the final version of this There is multiple trucks following similar schedules and all the end user wants to see is when the next truck will be arriving to them.

     

    Thanks in advance,

     

    Chris

     

     

     

     

  3. I am having trouble with preg_match, it probably stems from my lack of knowledge about regular expressions.  If someone could help me out I would really appreciate it.

     

    <h5>Plot Outline:</h5>

    23rd century soldier Major Mitch Hunter (Jane) leads a fight against an army of underworld NecroMutants.

    </div>

     

    I would like to search for the whole string, how do I make an expression that would let the part highlighted in blue be anything?  Hope that makes sense.

     

    Thanks,

    Chris

  4. [!--quoteo(post=381608:date=Jun 8 2006, 04:29 PM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Jun 8 2006, 04:29 PM) [snapback]381608[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    It depends... What is the format of the inserted timestamp?
    [/quote]

    when I insert a date, strtotime

    example $date = strtotime("06/07/2006");
  5. [!--quoteo(post=364089:date=Apr 12 2006, 11:00 AM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Apr 12 2006, 11:00 AM) [snapback]364089[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    if you're wanting to simply know HOW it's done, take a look at the code snippet below for a very basic example:


    hope this helps
    [/quote]

    That looks more like what I am after.

    Now any ideas how I would write that so that that function processes a .tpl file?
  6. I was looking at the some of the code that makes up PHPbb and what I see is the main page parses some sort of template.

    If I open up the template file I see things like this:
    [code]{SESSION}

    {TITLE}
    {HEADER}
    [/code]

    When the template is processed anything between {} gets converted to whichever variable is inside.

    Hope all that made sense now what I want to do is have something like that in a program I am working on. Anybody know how I might go about this?
  7. I have 3 tables im working with

     

    sab_merc (job table)

    -id

    -username

    -service

    -job_desc

     

    Users (user table)

    -id

    -username

    -other misc info

     

    onjob_sab (theis in the x-ref table in a many to many relationship)

    -user_id

    -job_id

     

     

    select  from onjob_sab left join sab_merc on(onjob_sab.user_id = sab_merc.id) where (onjob_sab.user_id != '1')

     

    what I get from this query is all the open jobs that user 1 is not part of.

     

    Now since multiple people can can be on multiple jobs I get a query that repeats the jobs for each users on them

    2     chris     sextreme69     AIM     Stryker_     http://www.kingsofchaos.com/stats.php?id=3012255     Elves     1     Gold     500000     0           11.13.05     1131940811     open     2     1
    2     chris     sextreme69     AIM     Stryker_     http://www.kingsofchaos.com/stats.php?id=3012255     Elves     1     Gold     500000     0           11.13.05     1131940811     open     2     3
    4     workwarnings     testee     MSN     Steeringwhell     http://www.kingsofchaos.com/stats.php?id=3009074     Elves     5     Gold     78552     0           11.15.05     1132116959     open     4     4
    4     workwarnings     testee     MSN     Steeringwhell     http://www.kingsofchaos.com/stats.php?id=3009074     Elves     5     Gold     78552     0           11.15.05     1132116959     open     4     5
    

     

    All I really want from this query is to fin all jobs that user 1 is not assiged too and them display them in a "while loop" using php.

     

    So in the example you can see that there is really only 2 jobs available that user 1 is not assiged too, but they get repeated since there is already other users on those jobs.

     

    Hope this makes sense

     

    Thanks in advance,

    Chris

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.