[PHP-DB] a where clause question

2002-10-06 Thread Alex Shi

Hi,

I need a where clause in following situation:

Say I want to query two tables: A and B. In table A there is field Afn,
while in table B there ere 3 fields: Bfn1, Bfn2 and Bfn3. I want to
compose a query, in which the where clause can do this: 

if A.Afn=1, then check Bfn1, 
if A.Afn=2, then check Bfn2,
if A.Afn=3, then check Bfn3.

So how I compose a where clause to do this? Thanks in advance!

Alex Shi



-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP-DB] convert mysql table to Excell or Access file

2002-07-12 Thread Alex Shi

Can MySQL table be converted to Access or Excell format?

Alex

-- 
---
TrafficBuilder Network: 
http://www.bestadv.net/index.cfm?ref=7029


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




[PHP-DB] Re: insert problem mysql

2001-09-05 Thread shi

Thanks

Shimon
"John Lim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use
>
> $s = addslashes($s);
>
>
> "Shi" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi
> > I'm trying to insert a text into a MYSQL DB, and here is the problem. If
> the
> > text looks like this "x xx x x xxx 'xxx xxx" then PHP interprets the
> > text following the ' as an sql statement. Does anyone know how to
overcome
> > this problem.
> >
> > Thank you
> > Shimon
> >
> >
>
>



-- 
PHP Database 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-DB] insert problem mysql

2001-09-05 Thread shi

Hi
I'm trying to insert a text into a MYSQL DB, and here is the problem. If the
text looks like this "x xx x x xxx 'xxx xxx" then PHP interprets the
text following the ' as an sql statement. Does anyone know how to overcome
this problem.

Thank you
Shimon



-- 
PHP Database 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-DB] INSERT Problem

2001-09-05 Thread shi

Hi
I'm trying to insert a text into a MYSQL DB, and here is the problem. If the
text looks like this "x xx x x xxx 'xxx xxx" then PHP interprets the
text following the ' as an sql statement. Does anyone know how to overcome
this problem.

Thank you
Shimon



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