Search found 32 matches

by Hadleigh
Tue Jan 06, 2004 6:03 am
Forum: mySQL & php coding
Topic: mysql_data_seek
Replies: 1
Views: 586

mysql_data_seek

I have a need to jump to a particular position within a resultset. The best way to explain what I need is by example. Here's my resultset: 1, Bob 2, Andrew 3, Graham I know that Bob has a unique ID of 1. I then sort the results alphabetically on Surname. 2, Andrew 1, Bob 3, Graham I want to get back...
by Hadleigh
Tue Nov 18, 2003 4:02 am
Forum: PHP coding => General
Topic: Outlook Calendar and Tasks
Replies: 1
Views: 659

Outlook Calendar and Tasks

Hi,

Does anyone know of a way to get PHP to send calendar and task information to Outlook?

I believe you need to send it through as a particular font or are there other ways?

if anyone has any online resources for this they would be greatly appreciated?

Thanks in advance,

Hadleigh
by Hadleigh
Thu Sep 18, 2003 9:11 am
Forum: PHP Installation
Topic: Special Chars configuration (strip/add slashes)
Replies: 2
Views: 1728

Special Chars configuration (strip/add slashes)

I have a problem with an installation of PHP 4.1.2 in that stripslashes are not working correctly. This problem is sporadic and appears to follow no particular pattern. I am using a competent bespoke CMS to display text on a site and slashes appear within that text where there are none in the MySQL ...
by Hadleigh
Wed Jul 16, 2003 8:17 am
Forum: PHP General
Topic: PHP knowledge test
Replies: 2
Views: 905

PHP knowledge test

Does anyone know of a good free test on PHP knowledge and where to get it please?

Thanks in advance,

Hadleigh
by Hadleigh
Tue Jun 24, 2003 6:27 am
Forum: PHP coding => Mail
Topic: Bounce Backs
Replies: 0
Views: 1089

Bounce Backs

Hi, I understand that there are over a hundred different bounce back messages. I am looking for a way to discern whether an email is a bounce back or a valid reply. Is there any unique and distinguishing feature within a bounce back (such as a unique id specifying its type) that would allow me to id...
by Hadleigh
Wed Jun 18, 2003 1:23 am
Forum: mySQL & php coding
Topic: UPDATE query duplication
Replies: 13
Views: 3239

I think I know what you mean, there's a MySQL SELECT statement that is: SELECT ..... FOR UPDATE My understanding is that MySQL queues its queries, executing them in order of their priority. An UPDATE has a higher priority than a SELECT forinstance, but the SELECT above knows what it is to do next an...
by Hadleigh
Tue Jun 17, 2003 5:39 am
Forum: mySQL & php coding
Topic: UPDATE query duplication
Replies: 13
Views: 3239

Unfortunately, I have another duplicate so changing the data type didn't work.

Can you think of anything else it may be? I was lookig at mySQL cache but don't think I'm on the right road with that.

Hadleigh
by Hadleigh
Tue Jun 17, 2003 2:26 am
Forum: mySQL & php coding
Topic: UPDATE query duplication
Replies: 13
Views: 3239

Okay, thanks Juan. I've changes the INT value (you learn something every day) and left the VARCHARS. I tried to change them but it had no effect - even though the SQL ran correctly. I can't re-create the table as the existing stats need to remain. I'll let it run for a day or so and then have anothe...
by Hadleigh
Tue Jun 17, 2003 1:53 am
Forum: mySQL & php coding
Topic: UPDATE query duplication
Replies: 13
Views: 3239

The PHP code is as simple as is above, there is nothing more to it apart from passing the $cat1, $cat2 and $cat3 values to it. Here's the database structure: CREATE TABLE stats_page_date ( date varchar(80) NOT NULL default '', week int(2) unsigned NOT NULL default '0', month varc...
by Hadleigh
Tue Jun 17, 2003 1:16 am
Forum: mySQL & php coding
Topic: UPDATE query duplication
Replies: 13
Views: 3239

There are a lot of concurrent connections, but I'm sure that the amount there are should not hamper the performance. I would estimate that the UPDATE query is executing anything between three and ten times every second (this site is the official site for a Formula One racing team). I have this stats...
by Hadleigh
Tue Jun 17, 2003 12:42 am
Forum: mySQL & php coding
Topic: UPDATE query duplication
Replies: 13
Views: 3239

Thanks for the response guys, I left the WHERE clause off the example but have it in the actual code. Here it is $query = "UPDATE stats_page_date SET views=views+1 WHERE (date='$xydate' AND cat1='$cat1' AND cat2='$cat2' AND cat3='$cat3')"; $result = mysql_query($query); I'm...
by Hadleigh
Thu Jun 12, 2003 4:08 am
Forum: mySQL & php coding
Topic: UPDATE query duplication
Replies: 13
Views: 3239

UPDATE query duplication

In a statistics system recording the number of visitors to a busy site (3000 + per day) I have noticed a duplication taking place using an update query similar to the one below. UPDATE stats SET count=count+1 I have proven that this is happening by stamping the query into a seperate table. To do so ...
by Hadleigh
Wed May 14, 2003 1:25 am
Forum: PHP coding => General
Topic: MySQL record-locking problem
Replies: 1
Views: 636

MySQL record-locking problem

I have a statistics system running on a web site achieving over 4000 unique visitors per day. This stats system records numerous things and uses the following MySQL query structure to do so: $result=mysql_query("UPDATE my_table SET count=count+1 WHERE day='$my_day'"); This stats system had been live...
by Hadleigh
Wed Mar 19, 2003 10:33 am
Forum: PHP coding => General
Topic: Session Cookie inconsistency
Replies: 1
Views: 648

Session Cookie inconsistency

Hi, I have a question more than a problem. I've got a login system that is (where user cookies are switched off) passing the PHPSESSID around to track user movements. This behavior appears inconsistent under different circumstances. Here's a few examples. if the URL is hard-coded as in this example ...
by Hadleigh
Tue Mar 18, 2003 1:02 pm
Forum: PHP coding => General
Topic: newbie problem
Replies: 2
Views: 845

If this wasn't a typo...

You wrote:

<?php echo "$param" ?>

Try:

<? echo "$param"; ?>

(You forgot the ; )

Otherwise you will need an upgrade.

Hadleigh.
by Hadleigh
Tue Mar 18, 2003 12:47 pm
Forum: PHP coding => General
Topic: Session Doesn't end when browser is closed???
Replies: 5
Views: 1380

One obvious thought is that if you had more than one browser window open on the same site and closed only one of them, that behavior would manifest itself naturally.

Hope I'm not teaching mother to suck eggs..

Hadleigh.
by Hadleigh
Tue Mar 18, 2003 12:34 pm
Forum: PHP coding => General
Topic: Detroying variables
Replies: 4
Views: 1060

My reason for wanting to get rid of the variables that have been passed in the post method is that they have been stored in the db for access within the non-secure area. Is there no way to do a 'destroy' such as with session data? I don't want to use session data as that doesn't work with everyone. ...
by Hadleigh
Tue Mar 18, 2003 10:34 am
Forum: PHP coding => General
Topic: seperating words
Replies: 0
Views: 685

I haven't tested this but I hope it helps! function sep($string){ $ip=explode("- -", $string); $ip=trim($ip[0]); $date=explode("]", $ip[1]); $date=str_replace("", "[", $date[0]); $date=trim($date[0]); $searc...
by Hadleigh
Tue Mar 18, 2003 10:21 am
Forum: PHP coding => General
Topic: Detroying variables
Replies: 4
Views: 1060

Cheers for the swift reply. It's a strange one this as I can stop it from happening! The way I have stopped it is very crude and involves making the page do a META refresh on the secure server ridding it of all the variable values, then, once it's Mr. Clean I META refresh it again, sending it to the...
by Hadleigh
Tue Mar 18, 2003 8:37 am
Forum: PHP coding => General
Topic: Detroying variables
Replies: 4
Views: 1060

Detroying variables

Hi, I am passing Form data (POST) to a script on a secure server for analysis. If the form data is correct I am then changing the URL to another domain in a non-secure area (via header(Location:...)). However, the browser is reporting that the data I am transferring to the new domain could be read b...
by Hadleigh
Thu Mar 13, 2003 1:56 am
Forum: PHP coding => General
Topic: multi-dimensional array sorting
Replies: 3
Views: 863

Thanks, but I was hoping that there would be a function out there. Putting the amount of data that I have to sort into a 'for' loop will be very processor intensive and I'm suprised that a 'sort' (or one of the many others) doesn't do this, or am I wrong?

Hadleigh.
by Hadleigh
Wed Mar 12, 2003 9:13 am
Forum: PHP coding => General
Topic: multi-dimensional array sorting
Replies: 3
Views: 863

multi-dimensional array sorting

Hi, I have a multi-dimensional array such as this one: $array[0]["name"]="foo"; $array[0]["url"]="foo"; $array[0]["type"]="foo"; $array[0]["order"]=1; $array[1]["name"]="foo"; $array[1]["url"]="foo"; $array[1]["type"]="foo"; $array[1]["order"]=2; $array[2]["name"]="foo"; $array[2]["url"]="foo"; $arr...
by Hadleigh
Fri Feb 21, 2003 1:31 am
Forum: PHP coding => General
Topic: Simple problem
Replies: 1
Views: 918

Hi, Your problem is twofold. Firstly you need to stop people without Flash being able to see the Flash file using Javascript, secondly you need to stop people without Javascript seeing the Flash file. For both of these I suggest you investigate the <NOSCRIPT> tag. But, here's some code: <OBJECT CLAS...
by Hadleigh
Thu Feb 20, 2003 8:31 am
Forum: PHP coding => General
Topic: A very basic and easy prob to solve
Replies: 5
Views: 1711

As a back up and to limit the number of times the page reloads on your site you might want to employ Javascript (I know this is a PHP forum but it's a horses for courses situation). <script language="JavaScript"> <!-- function checkrequired(which) { var pass=true; if (docu...
by Hadleigh
Thu Feb 20, 2003 8:15 am
Forum: PHP coding => General
Topic: Best editor for PHP
Replies: 203
Views: 162883

I have used many of the editors listed by people in this thread at various times and did, by choice, use PHPedit for a long time. It is a competent editor in its own right but has been greatly superceded by the functionality within Macromedia Dreamweaver MX. If you are prepared to pay money for your...