Re: [PHP] mySQL - Swap data in a field between two rows

2001-03-17 Thread Gary Huntress

I don't mean to be argumentative, but why would you need to do this?   A key
field is usually intended to uniquely identify a row and nothing more, the
actual value of the key (whether the id is 1 or 2)  *should* be immaterial.

I'm probably over simplifying this, but are you sure you really need to do
this?

Regards,

Gary H.
""Vincent P. Cocciolone"" <[EMAIL PROTECTED]> wrote in message
001001c0aeff$ce098dc0$[EMAIL PROTECTED]">news:001001c0aeff$ce098dc0$[EMAIL PROTECTED]...
> There must be an easy way, but it escapes me.
>
> How can I switch the data in a feild of one row with the data in that
field of
> another row?
>
> example:
> row: id=1 fname=John lname=Doe
> row: id=2 fname=Mary lname=Poppins
> to:
> row: id=2 fname=John lname=Doe
> row: id=1 fname=Mary lname=Poppins
> Thanks...
>
>
>
>
> --
> 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]




[PHP] phpinfo() doesn't list compiled --with

2001-03-20 Thread Gary Huntress

I compiled php --with-pgsql, but phpinfo() doesn't list that.is this a
problem with php.ini?

Thanks,

Gary



-- 
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] trim string

2001-03-21 Thread Gary Huntress

Perform the trim as part of the query:

"Select rtrim(app_name) , rtrim( status) from approval_list where
doc_no='6'"


"Wen Ni Leong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I need help in this basic string function.
> I query from the database by using while loop and the result in in
> array.  I separated them by using "," .
>
> I want at the end of the string to be trim off.  Unfortunately I tried
> all the string function such as chop,trim and substr but they seem like
> can't manage to trim the end of the string.  Please help me.
>
> my coding are:
>
> $db = mysql_select_db("tkenet_db");
> $query = "SELECT app_name,status FROM approval_list where doc_no='6'";
> $result = mysql_query($query,$db);
> while($data = mysql_fetch_row($result)){
>
>  $cc .= $h->get_email($data[0]).",";
>
>if ($data[1] != 'Y')
>  { $all_yes = 1;}
>   }
>  trim($cc);
>






> --
> 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]