Jump to content

Latest owner query


xsist10

Recommended Posts

Hey guys

I have 2 tables in my system that allow me to trace requests from clients.
One table contains the information about the client and the other contains the ownership of the query. This allows the clients "query" to be passed back and forth between various peole inside the company.

Table information below (culled some fields for simplification)
[code]
CREATE TABLE  `query` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(200) NOT NULL default '',
  `query` text NOT NULL,
  `created` datetime default NULL,
  `completed` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`)
);

CREATE TABLE  `query_trace` (
  `id` int(11) NOT NULL auto_increment,
  # corresponds to the entry in query table
  `query_id` int(11) NOT NULL default '0',
  `created` datetime default NULL,
  `completed` datetime NOT NULL default '0000-00-00 00:00:00',
  # the staff member this query has been passed to
  `owner` varchar(60) NOT NULL default '',
  PRIMARY KEY  (`id`)
);
[/code]

I want to query "query_trace" for a list of query_id's that belong to a specific owner only if it is the latest (created >) uncompleted (completed != "0000-00-00 00:00:00) entry.

Using GROUP BY query_id leaves me with the first entry for a specific query_id. I need to perform some kind of ORDER on the query before I cull un-needed entries.
Link to comment
Share on other sites

So here is my problem,

I am doing a little server to server communication, through REST. I have my server that responds with xml working fine, so clients can make a request and they get there data. Now I want to check the url of the client server, I thought I could use $_SERVER['HTTP_REFERER'] to obtain thier url, but it is empty. I'm assuming that unless they set the proper header data I wont be able to get the url, just the I.P. So is there another way to get this data ?

Also my clients are/will using cURL, fopen, and fsocket open to make a request to my server.

cheers
Link to comment
Share on other sites

Hello everyone,

First of all i am pretty new to PHP normally work in Flash scripting. I have some problem which i will describe in detail in case i miss any point or have done any mistake my apologies for the same.

I have installed the below as webserver and everything working fine.

Web-Developer Server Suite 1.18
[code]http://www.devside.net/server/webdeveloper[/code]


Now something about the problem.

I have got a script which download from a remote url with resume support. It uses socket connections to download the file. The script is working fine. But some hosts disable socket communication so does not works everywhere. The script has even script execution timeout handle which shows the resume download option in case the script stops before the download is complete.


I want the same thing to work without socket communication maybe using fread function.

[code]http://in.php.net/manual/en/function.fread.php[/code]

I tried the code posted above but unable to make it to work. It always shows file not found and i am no good in PHP.

If anyone can help me regarding this it will be appreciated. Please don't criticise me if i am asking too much. Also English is not my native language.
Link to comment
Share on other sites

Can someone tell me what's wrong with the following code?

[code]<?
session_start();
if(isset($_SESSION['first_name'])){
header("Location: content.php")
} [/code]

I'm putting this on the homepage of the site. I want to check if the user has already logged in, and if they have then they will be automatically re-directed to the first page of content (which also checks for logins)

However, I'm getting the following error message in the browser and I don't know why:

[quote]Parse error: syntax error, unexpected '}'[/quote]
Link to comment
Share on other sites

Over the next few weeks, I'm going to be working on a simple custom e-commerce site that will apparently be using SSL during transactions.  I know what SSL stands for, but beyond that, I'm clueless.  I also know that there's a PHP extension that deals with SSL (OpenSSL, I believe), but the spec is a bit confusing to me as I don't know the ins and outs of SSL.  Are there any resources you could direct me to that more or less explains the inner workings of SSL (things like certificates and whatnot)?

Thanks. :)
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.