RE: [PHP] php in free()

2001-12-17 Thread Niklas Lampén
Your code runs more than 30 seconds. Try using set_time_limit(n) function. Niklas -Original Message- From: Rick [mailto:[EMAIL PROTECTED]] Sent: 18. joulukuuta 2001 2:46 To: [EMAIL PROTECTED] Subject: [PHP] php in free() I'm running a script that times out durring a certian action.

RE: [PHP] php newbie

2002-01-02 Thread Niklas Lampén
To test your PHP scripts you do need a server with PHP. It's very easy to setup one on to you local machine + there is many completely free ones. Niklas -Original Message- From: Fady Fouad Shehata [mailto:[EMAIL PROTECTED]] Sent: 31. joulukuuta 2001 4:34 To: [EMAIL PROTECTED]

RE: [PHP] php newbie

2002-01-02 Thread Niklas Lampén
) Martin At 13:24 02.01.02 +0200, Niklas Lampén wrote: To test your PHP scripts you do need a server with PHP. It's very easy to setup one on to you local machine + there is many completely free ones. Niklas -Original Message- From: Fady Fouad Shehata [mailto:[EMAIL PROTECTED

RE: [PHP] foreach statement

2002-01-08 Thread Niklas Lampén
I think this is what you want to do: ? $sms_list = test_number; // This is the file with one e-mail address per line? $emails = file($sms_list); foreach($emails as $this_is_one_address) { // Do what ever you want to. // $this_is_one_address contains one element from $emails };

RE: [PHP] foreach statement

2002-01-09 Thread Niklas Lampén
Foreach works in PHP just like I told. foreach($emails as $this_is_one_address) is the correct form where $emails is an array and $this_is_one_address gets one element from $emails. This is similar to this (technically): for ($i = 0; $i count($emails); ++$i) { $this_is_one_address =

RE: [PHP] foreach statement

2002-01-09 Thread Niklas Lampén
-Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 10:15 AM To: Php-General Subject: RE: [PHP] foreach statement Foreach works in PHP just like I told. foreach($emails as $this_is_one_address) is the correct form where $emails

RE: [PHP] global/local var in a function

2002-01-10 Thread Niklas Lampén
This is because it creates a new thread, atleast I think it so. Use global variables to prevent this from happening: i = 0; function change_check_all(tree_item) { a = document.all[tree_item + _check]; b = document.all[tree_item + _count]; // changed the line below for(i =

RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén
I recommend you to use javascript for this one. That way you can make sure that client sees the message exactly for time you've decided (like 3 seconds). So: a) Just do It b) Just do It c) JavaScript for this one, launched _after_ page has loaded completely (use Body onLoad=script() -tag for

RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén
No good, since meta starts counting when page is first opened, so clients with slow connection might not never see the message. I'd rather use body onLoad=setTimeout(\location.href='http://domain.com/page.html', 5000\); which will execute right after the page is completely loaded and move to the

RE: [PHP] Display a mesagge and redirect (newbie)

2002-01-17 Thread Niklas Lampén
Well, there could be a problem with connection due to the ISP. Maybe this is not relevant with this case, but good to know for future use. I.e. if you have a picture on a page which will take more than 5 seconds to download (maybe due to a problem with connection), meta will redirect you after 5

RE: [PHP] Getting the last record in a mysql table

2002-01-17 Thread Niklas Lampén
If you have ID that is a incrementing number, you could just query like this: 'SELECT ID FROM MY_TABLE ORDER BY ID DESC, LIMIT 1' And there you have just one result, the last (biggest) ID number. Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 18.

RE: [PHP] Getting the last record in a mysql table

2002-01-17 Thread Niklas Lampén
, Hugh - Original Message - From: Niklas Lampén [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Thursday, January 17, 2002 10:29 PM Subject: RE: [PHP] Getting the last record in a mysql table If you have ID that is a incrementing number, you could just query like this: 'SELECT ID

RE: [PHP] Getting the last record in a mysql table FINALLY!!

2002-01-17 Thread Niklas Lampén
!! Niklas, I needed to change the statement slightly, but it did put me on the right track. Thanks again, Hugh $result=mysql_query(SELECT id FROM my_table ORDER BY id DESC, id limit 1); $id=mysql_result($result,0); - Original Message - From: Niklas Lampén [EMAIL PROTECTED] To: Php-General [EMAIL

RE: [PHP] Writing to text file from Radio Buttons

2002-01-22 Thread Niklas Lampén
fwrite()? Niklas -Original Message- From: Harphajan Singh [mailto:[EMAIL PROTECTED]] Sent: 22. tammikuuta 2002 9:51 To: [EMAIL PROTECTED] Subject: [PHP] Writing to text file from Radio Buttons Greeting dudes ! I`m a fresh user of PHP and need some technical assistance from you

RE: [PHP] mysql

2002-01-31 Thread Niklas Lampén
If I understood you correct, you want to know the amount of the rows in your table. Here you go (Assuming ID is the field you use to ident your rows): ...count(ID) AS CountValue... then treat CountValue as any field in a table. Niklas -Original Message- From: Mason Batley

RE: [PHP] question reg trim-strlen

2002-01-31 Thread Niklas Lampén
I think it won't work. If you don't want to trim the actual variable, but check if the trimmed variable is longer than 50 chars, here you go: if (strlen(trim($cust_adres)) 50) { } Niklas -Original Message- From: B. Verbeek [mailto:[EMAIL PROTECTED]] Sent: 31.

RE: [PHP] question reg trim-strlen

2002-01-31 Thread Niklas Lampén
var must stay trimmed! -Oorspronkelijk bericht- Van: Niklas Lampén [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 31 januari 2002 11:55 Aan: Php-General Onderwerp: RE: [PHP] question reg trim-strlen I think it won't work. If you don't want to trim the actual variable, but check

RE: [PHP] using eregi

2002-01-31 Thread Niklas Lampén
You could do it like this: ? $aTextFileArray = file(your_file.txt); $firstLineToPrint = 5; $lastLineToPrint = 10; for ($i = $firstLineToPrint; $i count($aTextFileArray) || $i $lastLineToPrint; $i++) { print Line $i: .$aTextFileArray[$i].br; }; ? Niklas -Original Message-

RE: [PHP] Anyone Up?

2002-01-31 Thread Niklas Lampén
eval() is your solution. for ($i = 1; $i = $NMax; $i++) { $variable = \$Check$i; eval(\$string = \$variable\;); echo $string.br; } Niklas -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: 1. helmikuuta 2002 9:16 To: [EMAIL PROTECTED]

RE: [PHP] Re: Anyone Up?

2002-02-01 Thread Niklas Lampén
You're wrong here, my friend. You can have any value you like. value=@£$ASDFSDF ASDP fosifu @}{$#%/@would work. Niklas -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: 1. helmikuuta 2002 10:48 To: Luke Welling Cc: Php-General Subject: Re: [PHP] Re: Anyone

RE: [PHP] Re: Anyone Up?

2002-02-01 Thread Niklas Lampén
Well, Netscape breaks value=This is to This, but IE understands that as This%20is. so if you set the value to be This%20is, both Netscape and IE understands that as This is. There are many other chars that can f**k up the value, so use htmlspecialchars() to correct that. Niklas -Original

RE: [PHP] Problem...header already sent by

2002-02-04 Thread Niklas Lampén
There can't be _anything_ before headers. Even a single space and/or linebreak causes an error. Niklas -Original Message- From: Peter Ruan [mailto:[EMAIL PROTECTED]] Sent: 5. helmikuuta 2002 7:42 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Problem...header already

RE: [PHP] Tricky array question

2002-02-05 Thread Niklas Lampén
It should be $category[0] = $glacier; ^--- ERROR in you code Niklas -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 5. helmikuuta 2002 11:59 To: [EMAIL PROTECTED] Subject: [PHP] Tricky array question Hi there, I have a tricky array

RE: [PHP] Re: Tricky array question

2002-02-05 Thread Niklas Lampén
I think you should ignore that. I use it all the times, and it works fine. Niklas -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 5. helmikuuta 2002 12:37 To: [EMAIL PROTECTED] Subject: [PHP] Re: Tricky array question Hello Rainer, what kind of disadvantages do I

RE: [PHP] Tricky array question

2002-02-05 Thread Niklas Lampén
[0];// returns 110 Does anybody know how to get the 110 out of the array? Thanx for any help, Andy Niklas lampén [EMAIL PROTECTED] schrieb im Newsbeitrag 008101c1ae2d$a9df7580$ba93c5c3@Niklas">news:008101c1ae2d$a9df7580$ba93c5c3@Niklas... It should be $ca

RE: [PHP] Checkboxe problem

2002-02-05 Thread Niklas Lampén
There is no way. How would you then know if the checkbox was checked or not? I use 'em like this input type=checkbox name=private value=myValue and then check if $private is myValue or not. If you really have to get some data thru, use hidden inputs. Niklas -Original Message- From:

RE: [PHP] Setting up group mailer

2002-02-13 Thread Niklas Lampén
Firstly: Keep track very carefully to whom you've allready sent the message, it might allways crash. Second: Add some Sleep()'s so it won't kill your mailserver. Third: Don't spam. :) Niklas -Original Message- From: phantom [mailto:[EMAIL PROTECTED]] Sent: 14. helmikuuta 2002 9:11

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Niklas Lampén
Maybe you can round the problem with if ($num 1) echo Nothing today!; else echo Something to do today!; if (!isset($num) || $num == 0)... Niklas -Original Message- From: Frank Miller [mailto:[EMAIL PROTECTED]] Sent: 18. helmikuuta 2002 16:05 To: [EMAIL PROTECTED]

RE: [PHP] date problem

2002-02-18 Thread Niklas Lampén
date() is your answer, use it in the piece of code generating the query. $DateTime = date(Y-m-d H:i:s); // 2002-02-18 16:10:43 Niklas -Original Message- From: eoghan [mailto:[EMAIL PROTECTED]] Sent: 18. helmikuuta 2002 16:14 To: [EMAIL PROTECTED] Subject: [PHP] date problem hello

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Niklas Lampén
- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 8:11 AM To: Php-General Subject: RE: [PHP] Mysql_num_rows Maybe you can round the problem with if ($num 1) echo Nothing today!; else echo Something to do today!; if (!isset($num) || $num == 0

RE: [PHP] PHP_SELF Undefined

2002-02-18 Thread Niklas Lampén
I had this problem while running PHP under windows. I solved (well, rounded :) the problem with $SCRIPT_NAME (if I remember it right) which gives the very same result. Niklas -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED]] Sent: 19. helmikuuta 2002 8:05 To: [EMAIL

RE: [PHP] foreach not in reach

2002-02-22 Thread Niklas Lampén
You didn't supply any information about you foreach() loop, but it works like foreach ($array as $string) print $elementbr\n; And explode() returns an array, so I think you need to do it like this: $array = explode(;, $string); array_push($authors, $array); // You could use foreach()

RE: [PHP] isset?

2002-02-27 Thread Niklas Lampén
If $submit is 0/NULL/FALSE and you do if ($submit) you'll receive FALSE. With if (isset($submit)) you'll receive TRUE. In other words, isset() checks if variable is set at all and is() checks if the expression is true. Niklas -Original Message- From: jtjohnston [mailto:[EMAIL

RE: [PHP] RE: sending multiple frames to different pages

2002-02-28 Thread Niklas Lampén
You can use javascript. If you're calling this from a frame, this is how it works: parent.frames[first_frame / zero based number].location.href = my_page.php; parent.frames[second_name / zero based number].location.href = my_page2.php; Problem with this is that if user clicks Back button in

RE: [PHP] create a file

2002-02-28 Thread Niklas Lampén
fopen(file, w) -Original Message- From: Thomas Franz [mailto:[EMAIL PROTECTED]] Sent: 1. maaliskuuta 2002 9:55 To: [EMAIL PROTECTED] Subject: [PHP] create a file good morning, i want to create a new file and save it in the current dir. I look in the manual but only i found how to

RE: [PHP] stripslashes in web forms

2002-03-04 Thread Niklas Lampén
This should do it: ? $test = 17\ blah; $test = stripslashes($test); ? input type=text name=test value=?=htmlspecialchars($test)? Niklas -Original Message- From: Claudiu [mailto:[EMAIL PROTECTED]] Sent: 4. maaliskuuta 2002 11:56 To: [EMAIL PROTECTED] Subject: [PHP] stripslashes in

RE: [PHP] keeping the dot

2002-03-04 Thread Niklas Lampén
Don't don't don't me.. ehehehehee... %P Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 4. maaliskuuta 2002 12:20 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] keeping the dot Don't don't me. Regards, Joseph A. Bannon -- PHP

RE: [PHP] case insenstive

2002-03-04 Thread Niklas Lampén
if (eregi(^a, $author)) { print blah!; } Niklas -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: 5. maaliskuuta 2002 8:08 To: [EMAIL PROTECTED] Subject: [PHP] case insenstive I need to make this case insensitive. This seems like over kill?

RE: [PHP] How to get the local date formated like this: 2002-03-15 Y2K Problem

2002-03-05 Thread Niklas Lampén
date(Y-m-d); Niklas -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: 5. maaliskuuta 2002 9:59 To: [EMAIL PROTECTED] Subject: [PHP] How to get the local date formated like this: 2002-03-15 Y2K Problem Hi there, I am trying to find out how to get the local date in a

RE: [PHP] exists?

2002-03-05 Thread Niklas Lampén
Do you have manual at all? Download it from www.php.net. The function ereg() is your answer. Niklas -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: 5. maaliskuuta 2002 10:29 To: [EMAIL PROTECTED] Subject: [PHP] exists? It's late, I'm tired. I want to parse

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Niklas Lampén
An option too: SELECT * FROM table WHERE SURNAME LIKE 'a%' ORDER BY surname ASC Niklas -Original Message- From: liljim [mailto:[EMAIL PROTECTED]] Sent: 11. maaliskuuta 2002 11:09 To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: A stupid question... Hi chuck, use left() assuming your

RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?

2002-03-12 Thread Niklas Lampén
Do you want to do this in mySQL or PHP? Niklas -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 12. maaliskuuta 2002 12:30 To: 'Php-General' Subject: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Hi,

RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?

2002-03-12 Thread Niklas Lampén
to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Thankyou for reply!! I want to do it in PHP. Thanks in advance Balaji -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:04 PM To: Php-General

RE: [PHP] rand()

2002-03-13 Thread Niklas Lampén
Use two rand()'s. $foo = rand(2); if ($foo == 0) rand(first_set); else rand(second_set); Niklas -Original Message- From: Jeff Sittler [mailto:[EMAIL PROTECTED]] Sent: 14. maaliskuuta 2002 7:50 To: [EMAIL PROTECTED] Subject: Re: [PHP] rand() the min and max would

RE: [PHP] Hi some logic help is required!!!!!

2002-03-14 Thread Niklas Lampén
First of all, take that 'I want to know when you received my e-mail' -thingie away. It's anoying. But to the solution: if ((x A || x B) (y A || x B)) { do something.. } Niklas -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 14. maaliskuuta 2002

RE: [PHP] Hi some logic help is required!!!!!

2002-03-14 Thread Niklas Lampén
Last X should be Y. Niklas -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: 14. maaliskuuta 2002 14:05 To: Php-General Subject: RE: [PHP] Hi some logic help is required! First of all, take that 'I want to know when you received my e-mail' -thingie away

RE: [PHP] array within an array

2002-03-15 Thread Niklas Lampén
$array[0][1] is how you access multi-dimensional arrays. Niklas -Original Message- From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]] Sent: 15. maaliskuuta 2002 15:18 To: [EMAIL PROTECTED] Subject: [PHP] array within an array I have an sql query which calls * rows from a table.

RE: [PHP] array within an array (one more query)

2002-03-15 Thread Niklas Lampén
Yes. Niklas -Original Message- From: Caspar Kennerdale [mailto:[EMAIL PROTECTED]] Sent: 15. maaliskuuta 2002 15:35 To: Php-General Subject: RE: [PHP] array within an array (one more query) can you therefore have $array[0][9][2][3] if you had an array within an array within an array

RE: [PHP] Timing PHP

2002-03-18 Thread Niklas Lampén
microtime() function's manual entry tells you exactly what you want to do. :) Niklas -Original Message- From: Stig Kronback [mailto:[EMAIL PROTECTED]] Sent: 18. maaliskuuta 2002 12:00 To: [EMAIL PROTECTED] Subject: [PHP] Timing PHP Dear ? I need to see how long it takes for my

RE: [PHP] how to pass values to PHP by clicking on imagemap

2002-03-19 Thread Niklas Lampén
Just declare the link to have variable to be a number depending on point where user clicks: www.server.com/mypage.php?number=1 Now the variable $number is set to '1'. Niklas -Original Message- From: Simon De Deyne [mailto:[EMAIL PROTECTED]] Sent: 19. maaliskuuta 2002 11:50 To:

RE: [PHP] Calling Javascript-function from php-script ...

2002-03-19 Thread Niklas Lampén
AFAK it's not possible since PHP is server-side and I guess your JavaScript is client-side. Niklas -Original Message- From: Marcel Besancon [mailto:[EMAIL PROTECTED]] Sent: 19. maaliskuuta 2002 14:05 To: [EMAIL PROTECTED] Subject: [PHP] Calling Javascript-function from php-script ...

RE: [PHP] Calling Javascript-function from php-script ...

2002-03-19 Thread Niklas Lampén
Then you need to do it like this: ? if ($myVal == ---) { ? script language=JavaScript alert(DOH!); /script ? }; ? But you can not make PHP call javascript functions directly. Niklas -Original Message- From: Marcel Besancon [mailto:[EMAIL PROTECTED]] Sent: 19. maaliskuuta 2002 14:20

RE: [PHP] Is there any Possible Way to get data from Excel File?

2002-03-19 Thread Niklas Lampén
I think that the smartest way to insert data from Excel to mySQL is saving Excel file as CSV and then inserting the whole file. This is ofcourse only if you wan't to insert the whole file. Niklas -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: 20. maaliskuuta 2002 8:01

RE: [PHP] Returning mutliple matches of a regex with preg_match()

2002-03-20 Thread Niklas Lampén
preg_match_all(); Niklas -Original Message- From: Stefen Lars [mailto:[EMAIL PROTECTED]] Sent: 21. maaliskuuta 2002 7:28 To: [EMAIL PROTECTED] Subject: [PHP] Returning mutliple matches of a regex with preg_match() Hello all I have been scratching my head for the last two days about

RE: [PHP] Soring an array

2002-04-09 Thread Niklas Lampén
You could use these two functions: array_unique(); and sort(); Niklas -Original Message- From: Vasoczki Ferenc [mailto:[EMAIL PROTECTED]] Sent: 9. huhtikuuta 2002 11:26 To: Php Mailing List (E-mail) Subject: [PHP] Soring an array Hi! I am new on this list, so i welcome everybody!

RE: [PHP] phpSearch

2002-06-05 Thread Niklas Lampén
Yeah, we'd be happy to develope such program for you. Is there something else you need, cash? : Niklas -Original Message- From: millw0rm [mailto:[EMAIL PROTECTED]] Sent: 6. kesäkuuta 2002 9:05 To: [EMAIL PROTECTED] Subject: [PHP] phpSearch Hi, I m looking for a

[PHP] RE: [PHP-DB] cookies and Global variables

2002-06-06 Thread Niklas Lampén
1. Cookies _has_ to be sent before anything else, that just is the case. 2. Sessions are the answer for thisone. Niklas -Original Message- From: Dib, Walid (MED, Stagiaire GEMS) [mailto:[EMAIL PROTECTED]] Sent: 6. kesäkuuta 2002 10:06 To: '[EMAIL PROTECTED]' Subject: [PHP-DB] cookies

RE: [PHP] tutorials

2002-06-12 Thread Niklas Lampén
Well, it depends on how well you know the basics of programming. If you're a total newbie, first of all learn how you use variables, conditional statements and loops. Without these you're powerless! :) One way is to just create a simple form on one page and then try thingies you can do with the

RE: [PHP] bulk mail()

2002-06-12 Thread Niklas Lampén
One solution could be this: You only need on page for this: 1) create an array of recipients 2) get value from array like array[$pos]; 3) send mail to this receiver 4) now some javascript, unless ofcourse if $pos is bigger than count($array): location.href =

RE: [PHP] Help with forms data please

2002-06-12 Thread Niklas Lampén
That's how I do it when I need to handle the data and return user to the same page. Use header(Location: blah); in the end of the handler page. Then even 'back'-button won't take user back to the handler page, and refresh won't send data again. Niklas -Original Message- From: Jonathan

RE: [PHP] Else/For loop

2002-06-12 Thread Niklas Lampén
If you still have an error there, change if ($num_results = 0) to if ($num_results == 0) See the difference? Realize the error? Niklas -Original Message- From: Roberts, Mark [mailto:[EMAIL PROTECTED]] Sent: 12. kesäkuuta 2002 16:20 To: [EMAIL PROTECTED] Subject: [PHP] Else/For loop

RE: [PHP] php-speed

2002-06-13 Thread Niklas Lampén
Embedding PHP in HTML, since I think HTML is ignored by php, just passed thru. Niklas -Original Message- From: Philipp Melab [mailto:[EMAIL PROTECTED]] Sent: 13. kesäkuuta 2002 14:55 To: [EMAIL PROTECTED] Subject: [PHP] php-speed I have a simple newbie question... Whats better

RE: [PHP] php-speed

2002-06-13 Thread Niklas Lampén
impression http://www.phpbeginner.com/columns/jason/echo Pradeep www.naharonline.com - Original Message - From: Niklas Lampén [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Thursday, June 13, 2002 5:38 PM Subject: RE: [PHP] php-speed Embedding PHP in HTML, since I think HTML

RE: [PHP] php-speed

2002-06-13 Thread Niklas Lampén
]] Sent: 13. kesäkuuta 2002 15:21 To: [EMAIL PROTECTED] Subject: Re: [PHP] php-speed See this And maybe you might change your impression http://www.phpbeginner.com/columns/jason/echo Pradeep www.naharonline.com - Original Message - From: Niklas Lampén [EMAIL

RE: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Niklas Lampén
Try $query = select count(*) as Lines from users where and then check the value of Lines. Or then do something like $query = select ID from users where and now your mysql_num_rows($result) should return right kinda value. Niklas -Original Message-

RE: [PHP] open database paradox

2002-06-18 Thread Niklas Lampén
Use ODBC. Niklas -Original Message- From: sonjaya [mailto:[EMAIL PROTECTED]] Sent: 19. kesäkuuta 2002 7:57 To: [EMAIL PROTECTED] Subject: [PHP] open database paradox i want to open and read database in paradox , how ### This message has

RE: [PHP] looping through numbers

2002-06-25 Thread Niklas Lampén
for ($i = 200; $i = 200; $i++) print $i ; Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta 2002 10:05 To: [EMAIL PROTECTED] Subject: [PHP] looping through numbers Hello , How do I do a loop that will increase a number tell it

RE: [PHP] looping through numbers

2002-06-25 Thread Niklas Lampén
it should ofcourse be for ($i = 200; $i = 250; $i++) print $i ; :) -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta 2002 10:05 To: Php-General Subject: RE: [PHP] looping through numbers for ($i = 200; $i = 200; $i++) print $i

RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén
Shorter version would be a href=?=$address? And this is not bad coding, it is actually faster than echoing everything. We had this conversation maybe a week ago, so let's not start it again. :) Niklas -Original Message- From: Craig [mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta

RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén
PROTECTED] Subject: Re: [PHP] function echo ' ' But the problem is that Im doin it inside a while loop. So I need to echo it. /mj Niklas lampén [EMAIL PROTECTED] skrev i meddelandet 025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas... Shorter version would be

RE: [PHP] Require()

2002-06-26 Thread Niklas Lampén
Try this: ? if ($viewsystem == 1) $Str = d:\\htdocs\\somewhere\\editexemptfiles.php?every=1; require($Str); ? Niklas -Original Message- From: Andy Whittlestone [mailto:[EMAIL PROTECTED]] Sent: 26. kesäkuuta 2002 15:37 To: [EMAIL PROTECTED] Subject: [PHP] Require() I want

RE: [PHP] Help and advice sought - search/replace

2002-06-26 Thread Niklas Lampén
If your list looks like this: Salo, Mika Räikkönen, Kimi Häkkinen, Mika And there is no other commas in the list, you can do it something like this: ? $commaSeparatedList = join(\n, file(NAMES.txt)); $tabSeparatedList = preg_replace(, , \t, $commaSeparatedList); $arrayOfTabSepList =

RE: [PHP] Newbie's question about \n

2002-07-22 Thread Niklas Lampén
If you check the source of your code you'll see that in source the text is in two lines. \n doesn't work as br, so this is about how HTML works, not plain text. Niklas -Original Message- From: KK Lee [mailto:[EMAIL PROTECTED]] Sent: 22. heinäkuuta 2002 14:01 To: [EMAIL PROTECTED]

RE: [PHP] how to generate a date between 1998 and today by random?

2002-05-07 Thread Niklas Lampén
array_rand() might be the solution for you. Niklas -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: 7. toukokuuta 2002 16:12 To: [EMAIL PROTECTED] Subject: [PHP] how to generate a date between 1998 and today by random? hi there, I am wondering if there is an easy way

RE: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Niklas Lampén
The platform doesn't matter here, since VarChar's maximum length is 255 chars, so everything above that is cutted away on insert. Creating table with VarChar(800) should give an error.. Niklas -Original Message- From: Michael Sims [mailto:[EMAIL PROTECTED]] Sent: 13. toukokuuta 2002

RE: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Niklas Lampén
in bytes of the data entered, not n bytes. The data entered can be 0 characters in length. The SQL-92 synonyms for varchar are char varying or character varying. - Original Message - From: Niklas Lampén [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: May 13 2002 05:38 AM Subject: RE

RE: [PHP] Getting only 255 chars from SQL Server

2002-05-13 Thread Niklas Lampén
no longer than 255 in MSSQL. You've lost the data over 255 chars with your current setup. Matt Friedman Web Applications Developer www.SpryNewMedia.com -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Monday May 13, 2002 8:56 AM To: Php-General Subject: RE: [PHP

RE: [PHP] Generating PINs

2002-05-13 Thread Niklas Lampén
Well, you could produce those randomly. Store all the PINs to a database and before storing compare that it doesn't exist yet. Here is a piece of code to produce PINs in _exactly_ that format you want. I've done it for myself, but feel free to use it in any way you like: ? srand((double)

RE: [PHP] Parse Error(newbie)

2002-05-29 Thread Niklas Lampén
mysql_query(delete from conf_event where time ( time() ); You're missing the ending there. Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 29. toukokuuta 2002 16:20 To: [EMAIL PROTECTED] Subject: Re: [PHP] Parse Error(newbie) Line 81 is $query.

RE: [PHP] How can I remove the last character from a one line file?

2002-05-30 Thread Niklas Lampén
eregi_replace(o$, , $String); Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 30. toukokuuta 2002 13:05 To: [EMAIL PROTECTED] Subject: RE: [PHP] How can I remove the last character from a one line file? Hi all, The problem is nearly

RE: [PHP] Parsing a CSV file

2001-10-03 Thread Niklas Lampén
That won't do if the list is 'R001,23,2,5'. I'd break that to parts with preg_match_all(). Niklas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 3. lokakuuta 2001 15:08 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Parsing a CSV file

RE: [PHP] Update Query - Urgent

2001-10-23 Thread Niklas Lampén
How about some code to see? Niklas -Original Message- From: Srinivasan Ranganathan [mailto:[EMAIL PROTECTED]] Sent: 23. lokakuuta 2001 15:22 To: [EMAIL PROTECTED] Subject: [PHP] Update Query - Urgent Hi I have a php script generate a sql update statement. when i query the database,

RE: [PHP] mail() question

2001-10-23 Thread Niklas Lampén
Well, not sure if this is a solution for you but I've done it with something like this: If ($Page == Form) { // Form itself with hidden field Page=Mailer } else if($Page == Mailer) { // Send the mail header(Location: youraddress?Page=Form); }; Hope this helps. Niklas

RE: [PHP] Using A Query Results Multiple Times

2001-10-24 Thread Niklas Lampén
mysql_data_seek(); Niklas -Original Message- From: Adam Douglas [mailto:[EMAIL PROTECTED]] Sent: 23. lokakuuta 2001 21:48 To: PHP-DB (mailing list) (E-mail); PHP-General (mailing list) (E-mail) Subject: [PHP-DB] Using A Query Results Multiple Times I have an instance where I

RE: [PHP] problem with a while loop

2001-10-26 Thread Niklas Lampén
What happens there is this: $email = 1. row; $email = 2. row; $email = 3. row; echo $email; You really need to put echo $email inside the loop or use '.=' to set up values to $email. Niklas -Original Message- From: Richard Kurth [mailto:[EMAIL PROTECTED]] Sent: 26. lokakuuta 2001

RE: [PHP] year 2002 strtotime problem

2001-11-01 Thread Niklas Lampén
Funny, I quickly tried this: ? $date1 = 12/12/2001; $date2 = 15/01/2002; $date1 = date(D M j Y, strtotime($date1)); $date2 = date(D M j Y, strtotime($date2)); print $date1.br; print $date2.br; print date(Y-m-d, strtotime($date1)).br; print date(Y-m-d, strtotime($date2)).br; ? And the result

RE: [PHP] year 2002 strtotime problem

2001-11-01 Thread Niklas Lampén
strtotime problem Even more funny... I cut and pasted your code and I got; Wed Dec 12 2001 Sat Mar 1 2003 2001-12-12 2001-03-01 What version of Php and OS are you using?? John Niklas lampén [EMAIL PROTECTED] wrote in message 000301c16369$6817a320$ba93c5c3@Niklas">news:000301c16369$

[PHP] mySQL problem

2001-11-01 Thread Niklas Lampén
I'm having a wierd problem with mySQL query. $Query = SELECT UCASE(Company), Icons, ID, LogoD FROM feComps; returns right amount of rows, but field Company is empty. $Query = SELECT Company, Icons, ID, LogoD FROM feComps.; works fine. First query works great when I run it in

[PHP] Very non-PHP (this is Java)

2001-11-13 Thread Niklas Lampén
This time VERY non-php, but I trust you guys! ;) Are Java applets stored automatically to cache? Can I prevent it somehow? Niklas

RE: [PHP] php query for mysql table

2001-08-20 Thread Niklas Lampén
% works as a wildcard in mySQL. Example: SELECT * FROM table WHERE Question LIKE '%life%' would return all rows with field Question containing string life. Niklas -Original Message- From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]] Sent: 20. elokuuta 2001 13:22 To: php-general

RE: Re[2]: [PHP] php query for mysql table

2001-08-20 Thread Niklas Lampén
This can be solved by building a function to split users entry to pieces so that the query will be like SELECT * FROM table WHERE Question LIKE '%word1%' || Question LIKE '%word2%' || Question. if only one of the words have to match the Question field. Niklas Lampén -Original Message

[PHP] mySQL Query - comparing multiple values with one field

2001-08-22 Thread Niklas Lampén
What I need to do is to compare if one field matches a value from a huge list of values. Do I need to query like SELECT * FROM table WHERE field LIKE '%value1%' || field LIKE '%value2%' or can I do it something like this SELECT * FROM table WHERE field LIKE ('%value1%' || '%value2%')? Niklas

RE: [PHP] How can I insert the data into the begining of a text file

2001-08-22 Thread Niklas Lampén
Use $fp = fopen($file, r+); PHP Manual would have told you this. Niklas -Original Message- From: Zenith [mailto:[EMAIL PROTECTED]] Sent: 22. elokuuta 2001 12:39 To: [EMAIL PROTECTED] Subject: [PHP] How can I insert the data into the begining of a text file I orginal have a function

[PHP] Removing files from a directory

2001-08-23 Thread Niklas Lampén
, 0, 3) == md_) { $split = explode(_, $file); if ((time() - $split[1]) 300) { unlink($file); }; }; }; What this does is return a Internal Server Error! If add do unlink(map/.$file); it returns file not found. What to do? What is wrong? Niklas Lampén

RE: [PHP] Removing files from a directory

2001-08-23 Thread Niklas Lampén
Solved it by myself. :) unlink($file); needs to be *exact* address to the file to be unlinked like /www/dir/map/$file. Just in case if someone else meets this problem! Niklas -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: 23. elokuuta 2001 15:17 To: Php

[PHP] Reading files from a directory

2001-08-24 Thread Niklas Lampén
I have problem with reading files from directory. This is the code: ? $Handle = opendir('/www/publico2/docs/map'); while ($file = readdir($Handle)) { print $filebr\n; }; ? That is ALL code on a script file. These are the file in directory: . .. array_maker.php4 map.php4 renamer.php4

RE: [PHP] Web fetching script

2001-08-27 Thread Niklas Lampén
You could do this if your $GrabStart and $GrabStop are ALLWAYS the same (Like: ###START### 10pm Blah ###STOP### ###START### 12pm Blahblah ###STOP### ) $file = file(url.txt); $str = join(\n, $file); // You can use whatever to join the rows $GrabStart = ###START###; $GrabEnd = ###STOP###; then

RE: [PHP] Web fetching script

2001-08-27 Thread Niklas Lampén
That file doesn't exist. Put it there again so I can take a look at it. And pls notify me when it's there. :) Niklas -Original Message- From: Ben Quinn [mailto:[EMAIL PROTECTED]] Sent: 27. elokuuta 2001 11:41 To: Php-General Cc: Niklas Lampén; [EMAIL PROTECTED] Subject: Re: [PHP] Web

[PHP] MySQL query length

2001-08-28 Thread Niklas Lampén
but it is VERY long. I also have to compare several words to one field so I've done many of those Field LIKE '%blah%' for those too. Is there any smarter way to do this? Niklas Lampén Internet Developer PubliCo Oy Ruoholahdenkatu 8 A FIN-00180 HELSINKI P. +358 - 9 - 6866 2541 F. +358 - 9 - 685 2940 E

[PHP] What does PHP stand for?

2001-08-28 Thread Niklas Lampén
It just crossed my mind: I don't know what PHP stands for...so anyone? :) Niklas

  1   2   >