[suspicious - maybe spam] [PHP] [suspicious - maybe spam] strange in MySQL Query.

2005-01-13 Thread adwin wijaya
Hi...
I have an query for mysql that looks like:
SELECT group as type FROM mytable WHERE id =101010
UNION
SELECT individual as type FROM myothertable WHERE id=101010
The strange result if only one result displayed from myothertable, so 
the type will become indiv instead of individual.

But when I tried to switch the query become :
SELECT individual as type FROM myothertable WHERE id=101010
UNION
SELECT group as type FROM mytable WHERE id =101010
it could displaye the result correctly. I dont know why .. is this mysql 
bug ?

--
===
Best Regards
Adwin Wijaya
http://masterkuya.blogspot.com/
http://www.kuya-kuya.net
http://www.e-rhema.net
===

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php terminal.

2004-12-20 Thread adwin wijaya
Hello all..
Since my webhosting didnt provide me with telnet access, I would like to
have a small software that created by php to do some bash function such 
as lynx, ls etc ?

thx a lot :)
--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] incompatibilities between php 4 and 5

2004-12-16 Thread adwin wijaya
Hi all,
I am going to migrate my application to php 5. My application didnt use 
 object so much. so, which area I need to be carefull about when I 
migrate to php 5. (if possible, could you give me the url that will 
explain about that)

thx
--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] email processing

2004-12-13 Thread adwin wijaya
Hi all :)
I want to create a system to process the email that coming. For example, 
I send a confirmation email to our client and they just simply reply the 
email that we send to them to verify. The problem I got, I dont know how 
to process the email that coming to our mailbox and process the message 
inside with PHP.

can someone recommend me a PHP class that has been created for handling 
this task ?

--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Data Access Object (DAO) with PHP

2004-12-12 Thread adwin wijaya
Thank you for DAO class that you recommended to me.
I would like to read the Pear and Metalstorage documentation ( tried 
it) first before deciding which one I would like to use ;)

--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] empty() problem

2004-12-12 Thread adwin wijaya
Ahmed Abdel-Aliem wrote:
Hi Group Members
i have a problem with function empty() 
i use it to check if user entered the form fields and store it in array

for example : 

if (empty($Game_rating))
$errors[] = You didn't enter the Online Status for the Game.;
the problem when the user enters 0 in the form field
the empty function returns the error.
can i  use another function that doesn't return false when the 0 is passes ?
any help plz ?

try to use isset() instead of empty.
empty() will be true if:
1. it contains 0
2. it is empty
3. or it contains white space.
but, for example if $x = '   ' ; .. isset() will return true instead of 
false. So try to trim($x) before doing isset.

cmmiw
--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Data Access Object (DAO) with PHP

2004-12-11 Thread adwin wijaya
Hi,
Is there any mature DAO class for PHP (free) ?
thx
--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Data Access Object (DAO) with PHP

2004-12-11 Thread adwin wijaya
Shen Kong wrote:
 Hi, do you mean ADODB? PEAR::DB? or DBX ?
-- more advance than that i think. It is a class that will be created 
to access database as object like the one in Java.

--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] baffled - please explain

2004-12-09 Thread adwin wijaya
Malcolm Mill wrote:
Hi, 
I just came across a sniplet of code in a book I'm reading and I'm not
sure what point the author is trying to make.

The code is:
function my_function ( )
{
  echo 'My function was called';
}
?php
function my_function ( )
{   
?
My function was called
?php
}
?

What are those single opening and closing curly braces doing in
separate ?php ? tag blocks? What's the point?
The author says Withing a function, curly braces enclose the code
that performs the task you require. Between these braces, you can have
anything that is legal elsewheere in a PHP script - PHP and MySQL Web
Development, 3rd Edition: Welling  Thomson.
If the point is to illustrate what this quote says, does that mean...
{   
?
My function was called
?php
}

...is a syntactically correct code block for my_function?
It is correct but it is not suggested.
The author want to show to you instead of using echo 'My function was 
called', you can do in that way.

but
 {
 ?
 My function was called
 ?php
 }
is not correct :)
best regards
adwin
www.kuya-kuya.net
www.e-rhema.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php