Back to the month index |
Back to the list index
|
bryan collins (bryan@netinfo.com.au)
Mon, 2 Sep 1996 15:47:42 +1000 (EST)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Gary Bickford: "Re: [mSQL] Msql and DATE fields..."
- Previous message: Anderson, Hans: "Re: [mSQL] Chat Rooms"
- In reply to: Jeff Lee: "Re: [mSQL] Chat Rooms"
- Next in thread: Joao Marcos Melo Mendes: "Re: [mSQL] mSQL + msql PERL interface"
From: bryan collins <bryan@netinfo.com.au> Message-Id: <199609020547.PAA04315@wilma.netinfo.com.au> Subject: Re: [mSQL] mSQL + msql PERL interface Date: Mon, 2 Sep 1996 15:47:42 +1000 (EST)i believe Coy, John said...
> What is the best way to quote my data once it is in an
> array? For example, if I have data in an array that I
> obtained from a function (example @info = getpwent()),
> how can I convert the elements of the array into quoted
> strings quickly so I can use them in an INSERT command?
> How can I do this even if the table I'm inserting them into
> doesn't contain all char() types in all the columns?
>
problem is you can't quote ints.
but because you are dealing with a specific number of elements in the array,
you can do it manually:
i,e
($uname,$passwd,$uid......)
$query = "insert into pwent values ( '$uname','$passwd',$uid,$gid,....... )
cheers
bry
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Gary Bickford: "Re: [mSQL] Msql and DATE fields..."
- Previous message: Anderson, Hans: "Re: [mSQL] Chat Rooms"
- In reply to: Jeff Lee: "Re: [mSQL] Chat Rooms"
- Next in thread: Joao Marcos Melo Mendes: "Re: [mSQL] mSQL + msql PERL interface"