RE: [PHP] mySQL problem

2001-11-02 Thread Niklas Lampn

SELECT UCASE(Company) AS Company works great, thanks!


Niklas


-Original Message-
From: Dimitris Kossikidis [mailto:[EMAIL PROTECTED]] 
Sent: 2. marraskuuta 2001 11:11
To: 'Niklas Lamp¨¦n'
Cc: PHP General
Subject: RE: [PHP] mySQL problem


Try this

$Query = SELECT UCASE(Company) as company,  Icons, ID, LogoD FROM
feComps; List ( $company, $icons, etc ) = mysql_fetch_row( );




 -Original Message-
 From: Niklas Lamp¦Én [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 10:22 AM
 To: Php-General
 Subject: [PHP] mySQL problem
 
 
 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 shell. What could cause this?
  
  
 Niklas
 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Funny thing with variables

2001-10-22 Thread Niklas Lampn

What causes this:
 
I have a page getting variable $BackLink with string 
http://www.domain.com/my_page.php4;.
I accidentaly wrote ?=~$BackLink? and what I got out was 
—‹‹ÅÐЈˆˆÑ™–‘“ž‘›š‡‹ŒÑœ’А™™š 
šŽŠšŒ‹ ™‘‹Ñ—Ë. What causes this? What does that ~ sign do 
before a variable?
 
 
Niklas Lampén



RE: [PHP] Funny thing with variables

2001-10-22 Thread Niklas Lampn

F... read it and got it! ;)
I had no idea what to look for..


Niklas


P.S. Thanks

-Original Message-
From: Tomy Wagner [mailto:[EMAIL PROTECTED]] 
Sent: 22. lokakuuta 2001 15:16
To: Niklas Lampén; Php-General
Subject: Re: [PHP] Funny thing with variables


rtfm :o http://www.php.net/manual/en/language.operators.bitwise.php

Wagner Tomy
Web Developer
Editus Luxembourg S.A.

- Original Message -
From: Niklas Lampén [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Monday, October 22, 2001 1:59 PM
Subject: [PHP] Funny thing with variables


 What causes this:

 I have a page getting variable $BackLink with string
http://www.domain.com/my_page.php4.
 I accidentaly wrote ?=~$BackLink? and what I got out was 
 —‹‹ÅÐЈˆˆÑ™–
‘“ž‘›š‡‹ŒÑœ’А™™š šŽŠšŒ‹ 
™‘‹Ñ—Ë. What causes this? What does that ~ sign do before a 
variable?


 Niklas Lampén



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To contact the list 
administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Niklas Lampn

You can do this:

$i = 0;
$fp = fopen("list.txt", "r");
while (!feof($fp)  $i  10) {
$i++;
$Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
print "$Textbr\n";
};


Niklas

-Original Message-
From: Tauntz [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 14:13
To: [EMAIL PROTECTED]
Subject: [PHP] How do I read the first n lines from a file?


hi !

I have a simmple question :)..

Lets say that I have a file called:
list.txt
and I want to take the first 10 lines from it  echo it to the browser ?

thank you
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Niklas Lampn

Oops.. Forgot to close the file. Put as last line:
fclose($fp);


Niklas

-Original Message-
From: Niklas Lampn [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 15:29
To: Tauntz; Php-General
Subject: RE: [PHP] How do I read the first n lines from a file?


You can do this:

$i = 0;
$fp = fopen("list.txt", "r");
while (!feof($fp)  $i  10) {
$i++;
$Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
print "$Textbr\n";
};


Niklas

-Original Message-
From: Tauntz [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 14:13
To: [EMAIL PROTECTED]
Subject: [PHP] How do I read the first n lines from a file?


hi !

I have a simmple question :)..

Lets say that I have a file called:
list.txt
and I want to take the first 10 lines from it  echo it to the browser ?

thank you
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How do I read the first n lines from a file?

2001-08-28 Thread Niklas Lampn

Yes. Then you have to do it a bit differently:

$file = file("list.txt"); // $file is now an array of lines in "list.txt"

for ($i = count($file); $i  count($file) - 10; $i--) {
print "$file[$i]br";
};


That should do. Didn't try it thou. That prints the lines in order last,
last-1, last-2


Niklas


-Original Message-
From: Tauntz [mailto:[EMAIL PROTECTED]]
Sent: 28. elokuuta 2001 15:00
To: php
Subject: Re: [PHP] How do I read the first n lines from a file?


hey.. thank you..
but is it possible to read the last lets say 10 lines from a file ?


- Original Message -
From: "Niklas Lampn" [EMAIL PROTECTED]
To: "Tauntz" [EMAIL PROTECTED]; "Php-General" [EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 3:28 PM
Subject: RE: [PHP] How do I read the first n lines from a file?


 You can do this:

 $i = 0;
 $fp = fopen("list.txt", "r");
 while (!feof($fp)  $i  10) {
 $i++;
 $Text = fgets($fp, 4096); // Reads first 4096 characters from a row.
 print "$Textbr\n";
 };


 Niklas

 -Original Message-
 From: Tauntz [mailto:[EMAIL PROTECTED]]
 Sent: 28. elokuuta 2001 14:13
 To: [EMAIL PROTECTED]
 Subject: [PHP] How do I read the first n lines from a file?


 hi !

 I have a simmple question :)..

 Lets say that I have a file called:
 list.txt
 and I want to take the first 10 lines from it  echo it to the browser ?

 thank you
 [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]