[PHP-DB] kinda unrelated, but curious...
...where do you people pick up freelance jobs? Any input on this? - David Balatero [EMAIL PROTECTED] - -- 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]
Re: [PHP-DB] RE: Storing Code in a db?
XML would be perfect for this. You store the XML in the database (usually a BLOB/CLOB/Long VARCHAR/etc) and your script pulls the XML out, and parses it there. You can have a set of input forms written in PHP which'll generate the XML for you. Of course, this assumes some knowledge of XML, but theoretically you could do it with a flat file format (like comma/tilde delimited) and just store the string in the database. It's trivial to write a PHP script that generates PHP directly... $str = echo \hi!\;; // you can use single-quotes if you're more comfortable with them $str .= echo \Done!\;; // note that it's got a ; INSIDE the string...it's PHP in there, after all eval($str); If you wanted to pre-generate it, I don't see any reason why you couldn't addslashes() the code, and INSERT it that way. Pull it back out, stripslashes() it, and eval() it. Voila! -Szii - Original Message - From: Mark McCray [EMAIL PROTECTED] To: olinux [EMAIL PROTECTED]; php-db [EMAIL PROTECTED] Sent: Monday, July 02, 2001 5:54 PM Subject: Re: [PHP-DB] RE: Storing Code in a db? Here was the application I was thinking of creating for my organization. We wanted to make an online survey tool. Where you can create a survey, with sections, possibly subsections, questions, and acceptable answers. It's easy enough to create this stuff each and every time, but it's ridiculously tedious. So why not make an application that does it automatically. So we were thinking that you kind of have to define the different types of questions/answers that can be used in the survey. For example, a straight text field, multiline text field, 5 radio button selection, 5 option pull-down, Yes/No radio button, checkboxes, etc... So in defining the types of questions/answers, we thought it might be cool to define each type of answer and the code that goes along with generating it. So when defining the survey questions, you tell it that the question has a 3 radio button answer, and the system would pull code from the database to help generate the question/answer html dynamically when someone goes to the survey. I know you could store the functions as includes, but just thought it would be cool if people could store the code in the database, because there might just be an answer type that I haven't yet thought to program. Marky on 7/1/01 2:34 PM, olinux at [EMAIL PROTECTED] wrote: Couldn't you just store the php commands as a txt file and then use a SSI [server side include]? olinux It would be very convenient to be able to store PHP (or any other server side code) in a database, then retrieve and execute it. I store a lot of website content with embedded HTML commands in a database. Being able to store PHP code in the database as well would be very convenient. Lets think about something: if we put some code in a field and then we out the of code from code put in temporal file and then include in our principal code :))) but i have a doubt eval funcion we work with functions printf, echo? i don't think so. The only way I can think of doing it would involve a lot of very messy parsing out of the php commands. I expect that would take way to much processing time. I don't imagine that would work for entire functions either. Maybe just individual PHP commands. Any ideas Thanks! Rita _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- 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 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]
Re: [PHP-DB] kinda unrelated, but curious...
Most of the time, by word of mouth. Other than that, scan the 'net, look on the job boards. If you're new to the field, put your name in a couple recruiters hands. Sure, it's not freelance, and you won't make as much, but a couple jobs and you start to become known. Once you're known, and have a portfolio, it just gets easier from there on out. Also look for part time work from home PHP jobs. You can pick up some reputation that way before quitting your REAL job. These are a real PITA to find, but they do exist. Oh, and let all your friends know that you're a PHP/web coder looking for work. It's amazing how many people know people that know people and you end up with work. 8-) -Szii - Original Message - From: David Balatero [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 11:27 PM Subject: [PHP-DB] kinda unrelated, but curious... ...where do you people pick up freelance jobs? Any input on this? - David Balatero [EMAIL PROTECTED] - -- 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 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]
RE: [PHP-DB] kinda unrelated, but curious...
Can you recommend job boards I won't have to pay to use? -- David -Original Message- From: Szii [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 11:27 PM To: David Balatero; [EMAIL PROTECTED] Subject: Re: [PHP-DB] kinda unrelated, but curious... Most of the time, by word of mouth. Other than that, scan the 'net, look on the job boards. If you're new to the field, put your name in a couple recruiters hands. Sure, it's not freelance, and you won't make as much, but a couple jobs and you start to become known. Once you're known, and have a portfolio, it just gets easier from there on out. Also look for part time work from home PHP jobs. You can pick up some reputation that way before quitting your REAL job. These are a real PITA to find, but they do exist. Oh, and let all your friends know that you're a PHP/web coder looking for work. It's amazing how many people know people that know people and you end up with work. 8-) -Szii - Original Message - From: David Balatero [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 11:27 PM Subject: [PHP-DB] kinda unrelated, but curious... ...where do you people pick up freelance jobs? Any input on this? - David Balatero [EMAIL PROTECTED] - -- 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 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] Date Format.
Hello all, I'm on the last leg of a project I'm doing, and maybe I'm just too fried but I've tried several things. Can anyone help: I've created an Event Listing form. The script pulls the table names from the DB and preg's them to create the field names for the form. Any field name that contains Date will be parsed as a Date. What's the best, most flexible way to go about parsing the user input into a Unix Timestamp? I've been using strtotime() and it seems to be off when the user types in 7-6-00 formatted dates. Is it possible to do without requiring the user use a specific format when entering dates? I'm also not stuck on using the Unix TS, but since I need to do a SELECT * I can't abstract any fields with SELECT DATE_FORMAT(). Anyone have any suggestions? Really the only problem here is that I can't select individual fields so I can't use MySQL date formatting without two queries. Thanks, John -- 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] passing db persistent connections through different pages
Hi, Big trouble ... with PostgreSQL 7.1.2 and PHP 4.0.6 on linux I'm using exactly the same configuration (and same application, same connection system) using PostgreSQL 7.1 and PHP 4.0.4pl1 same postgreSQL config file, same php.ini same kind of servers, same Apache version 1.3.19 and it's running perfectly then ... If I made a phpinfo on the webserver in the good case I have : pgsql PostgreSQL Support : enabled Active Persistent Links : 2 Active Links : 2 Directive: Local Value/Master Value pgsql.allow_persistent: On/On pgsql.max_links : 14/14 pgsql.max_persistent : 14/14 * But with the lastests versions (with PostgreSQL 7.1.2 and PHP 4.0.6) I have : ** pgsql PostgreSQL Support : enabled Active Persistent Links : 0 Active Links : 0 Directive: Local Value/Master Value pgsql.allow_persistent: On/On pgsql.max_links : 14/14 pgsql.max_persistent : 14/14 Impossible to get active links or active persistent link in the php_info() in this case ?? But the service is running ! :-/ ?? BUT in the postgres.log I get this all at many times (not each request but a lot of times) !! 2001-07-03 16:45:27 DEBUG: ProcessQuery 2001-07-03 16:45:27 DEBUG: CommitTransactionCommand pq_recvbuf: unexpected EOF on client connection 2001-07-03 16:45:26 DEBUG: proc_exit(0) 2001-07-03 16:45:26 DEBUG: shmem_exit(0) 2001-07-03 16:45:26 DEBUG: exit(0) /usr/local/pgsql/bin/postmaster: reaping dead processes... /usr/local/pgsql/bin/postmaster: CleanupProc: pid 29076 exited with status 0 /usr/local/pgsql/bin/postmaster: ServerLoop:handling reading 5 /usr/local/pgsql/bin/postmaster: ServerLoop:handling reading 5 /usr/local/pgsql/bin/postmaster: ServerLoop:handling writing 5 /usr/local/pgsql/bin/postmaster: BackendStartup: pid 29077 user toto db mydb socket 5 /usr/local/pgsql/bin/postmaster child[29077]: starting with (postgres -d2 -v1310 72 -p mydb) FindExec: found /usr/local/pgsql/bin/postgres using argv[0] If I look to the backends of the postgreSQL they are like classical connections ... so they seems to close all the time (I do not use pg_close function) !! In the normal case I have all the time a minimum of 98 backends running (persistant connexions) !! And if I look to the backends of apache they seems to move a lot ... moving for 10 to 80 to 40 to 64 etc in the space of 1 second ! In normal case the number of apache backends grow slowly and down also slowly ... I really do not understand what happend ... and do not find the mistake ... does anybody have any idea ??? Thanks per advance for your answers !! -- Hervé -- 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]
Re: [PHP-DB] kinda unrelated, but curious...
HI, I stumbled on this site http://www.missoulaweb.com/freelance.phtml see if you think it is cool.. Ken - Original Message - From: David Balatero [EMAIL PROTECTED] To: Szii [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 12:03 AM Subject: RE: [PHP-DB] kinda unrelated, but curious... Can you recommend job boards I won't have to pay to use? -- David -Original Message- From: Szii [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 11:27 PM To: David Balatero; [EMAIL PROTECTED] Subject: Re: [PHP-DB] kinda unrelated, but curious... Most of the time, by word of mouth. Other than that, scan the 'net, look on the job boards. If you're new to the field, put your name in a couple recruiters hands. Sure, it's not freelance, and you won't make as much, but a couple jobs and you start to become known. Once you're known, and have a portfolio, it just gets easier from there on out. Also look for part time work from home PHP jobs. You can pick up some reputation that way before quitting your REAL job. These are a real PITA to find, but they do exist. Oh, and let all your friends know that you're a PHP/web coder looking for work. It's amazing how many people know people that know people and you end up with work. 8-) -Szii - Original Message - From: David Balatero [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 11:27 PM Subject: [PHP-DB] kinda unrelated, but curious... ...where do you people pick up freelance jobs? Any input on this? - David Balatero [EMAIL PROTECTED] - -- 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 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 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] Trouble: pq_recvbuf: unexpected EOF on client connection
Hi, Big trouble ... with PostgreSQL 7.1.2 and PHP 4.0.6 on linux I'm using exactly the same configuration (and same application, same connection system) using PostgreSQL 7.1 and PHP 4.0.4pl1 same postgreSQL config file, same php.ini same kind of servers, same Apache version 1.3.19 and it's running perfectly then ... If I made a phpinfo on the webserver in the good case I have : pgsql PostgreSQL Support : enabled Active Persistent Links : 2 Active Links : 2 Directive: Local Value/Master Value pgsql.allow_persistent: On/On pgsql.max_links : 14/14 pgsql.max_persistent : 14/14 * But with the lastests versions (with PostgreSQL 7.1.2 and PHP 4.0.6) I have : ** pgsql PostgreSQL Support : enabled Active Persistent Links : 0 Active Links : 0 Directive: Local Value/Master Value pgsql.allow_persistent: On/On pgsql.max_links : 14/14 pgsql.max_persistent : 14/14 Impossible to get active links or active persistent link in the php_info() in this case ?? But the service is running ! :-/ ?? BUT in the postgres.log I get this all at many times (not each request but a lot of times) !! 2001-07-03 16:45:27 DEBUG: ProcessQuery 2001-07-03 16:45:27 DEBUG: CommitTransactionCommand pq_recvbuf: unexpected EOF on client connection 2001-07-03 16:45:26 DEBUG: proc_exit(0) 2001-07-03 16:45:26 DEBUG: shmem_exit(0) 2001-07-03 16:45:26 DEBUG: exit(0) /usr/local/pgsql/bin/postmaster: reaping dead processes... /usr/local/pgsql/bin/postmaster: CleanupProc: pid 29076 exited with status 0 /usr/local/pgsql/bin/postmaster: ServerLoop:handling reading 5 /usr/local/pgsql/bin/postmaster: ServerLoop:handling reading 5 /usr/local/pgsql/bin/postmaster: ServerLoop:handling writing 5 /usr/local/pgsql/bin/postmaster: BackendStartup: pid 29077 user toto db mydb socket 5 /usr/local/pgsql/bin/postmaster child[29077]: starting with (postgres -d2 -v1310 72 -p mydb) FindExec: found /usr/local/pgsql/bin/postgres using argv[0] If I look to the backends of the postgreSQL they are like classical connections ... so they seems to close all the time (I do not use pg_close function) !! In the normal case I have all the time a minimum of 98 backends running (persistant connexions) !! And if I look to the backends of apache they seems to move a lot ... moving for 10 to 80 to 40 to 64 etc in the space of 1 second ! In normal case the number of apache backends grow slowly and down also slowly ... I really do not understand what happend ... and do not find the mistake ... does anybody have any idea ??? Thanks per advance for your answers !! -- Hervé -- 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]
Re: [PHP-DB] Issue with MSSQL_QUERY()
With mysql you can do mysql_insert_id. The following code should do what you need in mssql. $query=InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $id=mssql_query(select @@IDENTITY as 'taskid'); $taskid=mssql_fetch_array($id); $taskid will then be whatever mssql set your identity/autoincrement field to be. Regards, Tony -- Tony McCrory IT, Trinity Mirror group (Ireland) (028) 9068 0168 [EMAIL PROTECTED] Ryan Marrs rmarrs@strtrTo: '[EMAIL PROTECTED]' [EMAIL PROTECTED] ade.com cc: Subject: [PHP-DB] Issue with MSSQL_QUERY() 07/03/2001 08:14 PM I've run into an issue using MSSQL_QUERY() that I cannot seem to figure out a work-around for. The last field in the query is an auto-increment starting at 100,000. I need the MSSQL_QUERY($query) statement to print out the result of the query (which is a stored procedure in case that wasn't obvious). Instead it returns True (1) or False (0?). Does anyone have suggestions? I am completely stumped at this point. Thanks! Ryan $query=InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $taskid=$return; -RESULT - $taskid = 1 IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding company for the Trinity Mirror group of companies and is registered in England No. 82548, with its address at Kingsfield Court, Chester Business Park, Chester CH4 9RE. -- 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] Handling Linefeeds in MySQL/PHP
I am creating a content management page that uses a textarea box to enter a chunk of text which then is sent into the database into a text-type field. I am finding that when the data is retrieved to be shown in the browser that the line feeds are lost. I don't want users to have to know HTML to put tags in themselves. What's the best way to handle this? Can I read from the database and insert br's and p's to be put into the displayed HTML? Or, instead, is there a way to put the br's and p's immediately into the database when the record is inserted? How can I do this? How would the string be manipulated? Thanks for your help, -Casey -- 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]
Re: [PHP-DB] Handling Linefeeds in MySQL/PHP
Try nl2br() http://www.php.net/manual/en/function.nl2br.php On Tue, 3 Jul 2001, Bessette, Casey wrote: -I am creating a content management page that uses a textarea box to enter a -chunk of text which then is sent into the database into a text-type field. - -I am finding that when the data is retrieved to be shown in the browser that -the line feeds are lost. I don't want users to have to know HTML to put -tags in themselves. What's the best way to handle this? - -Can I read from the database and insert br's and p's to be put into the -displayed HTML? Or, instead, is there a way to put the br's and p's -immediately into the database when the record is inserted? How can I do -this? How would the string be manipulated? - -Thanks for your help, --Casey - --- -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] - ** John Huggins Virginia Net Corporation 7101 Oriole Avenue Springfield, VA 22150 703-912-6214 703-912-4831 fax [EMAIL PROTECTED] http://www.va.net/ ** -- 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]
Re: [PHP-DB] Issue with MSSQL_QUERY()
sorry bum info in my last post, it should have read $id=mssql_query(select @@IDENTITY as 'taskid'); $result=mssql_fetch_array($id); $taskid=$result[taskid]; Tony tony.mccrory@ mgn.co.ukTo: Ryan Marrs [EMAIL PROTECTED] cc: '[EMAIL PROTECTED]' [EMAIL PROTECTED] 07/03/2001 Subject: Re: [PHP-DB] Issue with MSSQL_QUERY() 08:25 PM With mysql you can do mysql_insert_id. The following code should do what you need in mssql. $query=InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $id=mssql_query(select @@IDENTITY as 'taskid'); $taskid=mssql_fetch_array($id); $taskid will then be whatever mssql set your identity/autoincrement field to be. Regards, Tony -- Tony McCrory IT, Trinity Mirror group (Ireland) (028) 9068 0168 [EMAIL PROTECTED] Ryan Marrs rmarrs@strtrTo: '[EMAIL PROTECTED]' [EMAIL PROTECTED] ade.com cc: Subject: [PHP-DB] Issue with MSSQL_QUERY() 07/03/2001 08:14 PM I've run into an issue using MSSQL_QUERY() that I cannot seem to figure out a work-around for. The last field in the query is an auto-increment starting at 100,000. I need the MSSQL_QUERY($query) statement to print out the result of the query (which is a stored procedure in case that wasn't obvious). Instead it returns True (1) or False (0?). Does anyone have suggestions? I am completely stumped at this point. Thanks! Ryan $query=InsertRequest '1','2','3','4/11/01','5','6','7','8','9/11/01','10/11/01','11','12','13','1 4','15',''; $return=MSSQL_QUERY($query); $taskid=$return; -RESULT - $taskid = 1 IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. Trinity Mirror plc is the holding company for the Trinity Mirror group of companies and is registered in England No. 82548, with its address at Kingsfield Court, Chester Business Park, Chester CH4 9RE. -- 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] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are
[PHP-DB] sybase_query()
Please take a look into my simple php code. Why does this program die on query2 failed but a new record acturally is inserted into table pub_info? I asked this question last week, but didn't get any answer so far. If you don't see any problem in there, please let me know. This is my last try! Please help me! ? $conn=sybase_connect(xxx,xxx,); sybase_select_db(pubs,$conn); $result=@sybase_query(select * from authors,$conn) or die(query1 failed); sybase_free_result($result); $result=@sybase_query(insert into pub_info values(0001,null,'test'),$conn) or die(query2 failed); sybase_free_result($result); $result=@sybase_query(select * from pub_info,$conn); sybase_free_result($result); ? working environment: SunOS5.8, php4, freetds, MSSQL Server Thanks, jongjong __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- 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]
Re: [PHP-DB] Handling Linefeeds in MySQL/PHP
The information returned from a text box includes line feeds in the form of \n which is not recognized by browsers as a line feed. To make it display properly, you need to convert all the \ns to brs.. Here's a snippet of code that I use: // Assume that the text field is named 'message' and this is the code that processes the form input $message = ereg_replace(\n,br, $message); //Now this will display properly. Often it is handy to change quotes to quot so that you don't run into php conflicts when you're processing the text. You can use the same command to do that. Hope this helps, -Micah Stevens Raincross Technologies At 02:29 PM 7/3/2001 -0500, you wrote: I am creating a content management page that uses a textarea box to enter a chunk of text which then is sent into the database into a text-type field. I am finding that when the data is retrieved to be shown in the browser that the line feeds are lost. I don't want users to have to know HTML to put tags in themselves. What's the best way to handle this? Can I read from the database and insert br's and p's to be put into the displayed HTML? Or, instead, is there a way to put the br's and p's immediately into the database when the record is inserted? How can I do this? How would the string be manipulated? Thanks for your help, -Casey -- 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 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]
Re: [PHP-DB] problems connecting to remote oracle database
On Tue, Jul 03, 2001 at 09:43:52AM -0400, Brian S. Dunworth wrote: Hi Phil... Since you have the server name (vs. the IP address) in the HOST= verb, make sure you have an entry in /etc/hosts for a server called 'staging' yes, that's there, otherwise, I wouldnt be able to use sqlplus with the name in the same fashion, from the same client machine. -- 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]