Re: HTML in MySQL?

2005-09-12 Thread clint lenard
Hey Douglass, Curious about using Smarty (taking the Crash Course and bookmarked a couple of other tut's)... One of the advantages of using a DB to store the HTML Sites was the opportunity to give the user an automated Zip file of their site if they wanted to download it and create their own

Re: HTML in MySQL?

2005-09-12 Thread clint lenard
can anyone help me with this question? On 9/12/05, clint lenard [EMAIL PROTECTED] wrote: Hey Douglass, Curious about using Smarty (taking the Crash Course and bookmarked a couple of other tut's)... One of the advantages of using a DB to store the HTML Sites was the opportunity to give

Re: HTML in MySQL?

2005-09-12 Thread Hassan Schroeder
clint lenard wrote: can anyone help me with this question? (about using Smarty) No doubt -- but that anyone would likely be on a Smarty-specific (or at least PHP-oriented) mailing list, eh? :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1)

Re: HTML in MySQL?

2005-09-11 Thread Vladimir B. Tsarkov
Hello! But once you have done that, you can never recover the origional text. Try it on this email if you doubt it. Why? Why not to use regular expressions? Use addslashes($htmlCode) and execute query normally. $slashedHtmlCode = addslashes($htmlCode); The problem is not in the executing

Re: HTML in MySQL?

2005-09-11 Thread Roger Baklund
Vladimir B. Tsarkov wrote: After the execution of the script: ?php $string = \n\n\n\n 1; echo addslashes($string); ? we will get: 1 and no empty lines. If you want to output the same data, that was written using a textarea field of a form, you should use the br tag. In one word: kiss.

RE: HTML in MySQL?

2005-09-11 Thread John Trammell
@lists.mysql.com Cc: mysql@lists.mysql.com Subject: Re: HTML in MySQL? Hello! But once you have done that, you can never recover the origional text. Try it on this email if you doubt it. Why? Why not to use regular expressions? Use addslashes($htmlCode) and execute query normally

Re: HTML in MySQL?

2005-09-11 Thread Jasper Bryant-Greene
John Trammell wrote: $input = This is br the \n input;# value from user $saved = This is br the br input; # value in database $recovered = This is \n the \n input; # retrieved from db, != $input Please don't top-post. That is the perfect argument for not applying nl2br() before saving

Re: HTML in MySQL?

2005-09-11 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: John Trammell wrote: $input = This is br the \n input;# value from user $saved = This is br the br input; # value in database $recovered = This is \n the \n input; # retrieved from db, != $input Please don't top-post. That is the perfect argument for not

Re: HTML in MySQL?

2005-09-11 Thread clint lenard
Wow, thanks for all of the Information guys! I've learned alot and now I've actually been doing more brain storming... I've been reading all of these emails over and over - and they're helping me understand more! What I'm trying to do is save User Sites in MySQL and use PHP to pull them out

Re: HTML in MySQL?

2005-09-11 Thread douglass_davis
clint lenard wrote: Hi guys, I'm fairly new to MySQL and I've searched for about a week looking for an answer to this... I'm trying to design a Database that would hold HTML sites in the DB itself and use PHP to call for the HTML file - which would be populated with Content from another

Re: HTML in MySQL?

2005-09-11 Thread clint lenard
Douglass, thanks for the tips! As far as Mambo or Xoops - I wanted to create something a little different - but I WAS thinking of using Smarty before-hand... I just wasn't sure how I could really use it? I'm familiar with Smarty as far as I've played around with it a little... but I guess I

Re: HTML in MySQL?

2005-09-09 Thread Jasper Bryant-Greene
clint lenard wrote: Hi guys, I'm fairly new to MySQL and I've searched for about a week looking for an answer to this... I'm trying to design a Database that would hold HTML sites in the DB itself and use PHP to call for the HTML file - which would be populated with Content from another

Re: HTML in MySQL?

2005-09-09 Thread clint lenard
Thanks Jasper for the info! This may sound stupid - but I just want to be sure... do I need to strip the slashes and special characters out and add them when they're called... or..? I'm just trying to get a clear picture of exactly what needs to be done with this particular job... thanks!

RE: HTML in MySQL?

2005-09-09 Thread Logan, David (SST - Adelaide)
Hi Clint, Another possibility is to actually run the mysql client with a --html option and let mysql do the work for you eg : prompt $ echo SELECT some_stuff FROM table | mysql -u xyz -pxxx --html This generates a block of html for a table with the data encapsulated within, then it is just a

Re: HTML in MySQL?

2005-09-09 Thread clint lenard
David and Jasper - thank you both! I will play around with this more now that you have explained my biggest questions! Thanks guys, Clint :-) On 9/9/05, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: clint lenard wrote: Thanks Jasper for the info! This may sound stupid - but I just want

Re: HTML in MySQL?

2005-09-09 Thread Jasper Bryant-Greene
clint lenard wrote: Thanks Jasper for the info! This may sound stupid - but I just want to be sure... do I need to strip the slashes and special characters out and add them when they're called... or..? I'm just trying to get a clear picture of exactly what needs to be done with this

Re: HTML in MySQL?

2005-09-09 Thread Vladimir B. Tsarkov
Hello, Clint! I'm trying to design a Database that would hold HTML sites in the DB itself and use PHP to call for the HTML file - which would be populated with Content from another table in MySQL. I was told I could put HTML into MySQL... so my main question would be: is this possible?, is

RE: HTML in MySQL?

2005-09-09 Thread Alan Williamson
If you use textarea field of a form, it produces null characters (\n) in the end of every string. I recommed to replace them with br tags before writing into the database. It'll help to avoid output problems. Use preg_replace(); for it. Be careful here Vladimir, the (\n) are not 'null'

RE: HTML in MySQL?

2005-09-09 Thread John Trammell
, September 09, 2005 10:11 AM To: mysql@lists.mysql.com Subject: RE: HTML in MySQL? If you use textarea field of a form, it produces null characters (\n) in the end of every string. I recommed to replace them with br tags before writing into the database. It'll help to avoid output

Re: HTML in MySQL?

2005-09-09 Thread Vladimir B. Tsarkov
Hello! Be careful here Vladimir, the (\n) are not 'null' characters; but newline characters. Agree, I was wrong. And i would highly recommend *not* replacing them with br tags as you write them into the database. This is asking for trouble on so many levels. The database will cope

Re: HTML in MySQL?

2005-09-09 Thread gerald_clark
Vladimir B. Tsarkov wrote: Hello! Be careful here Vladimir, the (\n) are not 'null' characters; but newline characters. Agree, I was wrong. And i would highly recommend *not* replacing them with br tags as you write them into the database. This is asking for trouble on so

Re: HTML in MySQL?

2005-09-09 Thread Filipe Tomita
Use addslashes($htmlCode) and execute query normally. ?php $slashedHtmlCode = addslashes($htmlCode); ? []´s Tomita On 9/9/05, Vladimir B. Tsarkov [EMAIL PROTECTED] wrote: Hello! Be careful here Vladimir, the (\n) are not 'null' characters; but newline characters. Agree, I

Re: HTML in MySQL Tables

2004-05-21 Thread Hassan Schroeder
David Blomstrom wrote: Some time ago, I posted a question about using HTML in MySQL tables. Someone suggested this is a bad strategy, asking what I would do if I later decided to change the italicized words to bold, for example. I'm just trying to figure out what the options are, as well as

Re: HTML in MySQL Tables

2004-05-21 Thread David Blomstrom
--- Hassan Schroeder [EMAIL PROTECTED] wrote: If Cowboy State has a semantic meaning, like nickname, you might want to think about either having a field for it or, if it's part of a text segment that doesn't lend itself to that, use a semantic tag for it, like `nicknameCowboy State/nickname,

Re: HTML in MySQL Tables

2004-05-21 Thread David Blomstrom
--- Hassan Schroeder [EMAIL PROTECTED] wrote: If Cowboy State has a semantic meaning, like nickname, you might want to think about either having a field for it or, if it's part of a text segment that doesn't lend itself to that, use a semantic tag for it, like `nicknameCowboy State/nickname,

Re: HTML in MySQL Tables

2004-05-21 Thread Hassan Schroeder
David Blomstrom wrote: You mean I can make up a name for a semantic tag, designating every nicknname nickname or every emphasized word emphasize, for example? Yep, XML lets you create your own DTD/schema -- though sometimes it makes sense to use (or leverage) an existing one. And is this something

Re: HTML in MySQL Tables

2004-05-21 Thread Greg Willits
On May 21, 2004, at 9:14 PM, David Blomstrom wrote: --- Hassan Schroeder [EMAIL PROTECTED] wrote: If Cowboy State has a semantic meaning, like nickname, you might want to think about either having a field for it or, if it's part of a text segment that doesn't lend itself to that, use a semantic

Re: Html and mysql..

2004-05-06 Thread SGreen
Brad wrote Josh Trutwin writes: Javascript is a client-side language, the code is executed by the user's browser. It has no way to connect to the database server and run queries so you need to use a server-side programming language like Java (JDBC), PhP, Perl, etc. Tomcat is a decent servlet

Re: Html and mysql..

2004-05-05 Thread Peter J Milanese
Javascript is a client side language. I seriously doubt it alone would do anything for you. My Sql [EMAIL PROTECTED] 05/05/2004 12:18 PM To: [EMAIL PROTECTED] cc: Subject:Html and mysql.. Hi all, I have got one serious doubt. Can we access mysql

Re: Html and mysql..

2004-05-05 Thread Josh Trutwin
On Wed, 5 May 2004 09:18:01 -0700 (PDT) My Sql [EMAIL PROTECTED] wrote: Hi all, I have got one serious doubt. Can we access mysql database from the front end html. If it all it is possible, we have to right in javascript. ofcourse we can write it using JDBC(provided we have a servlet engine

RE: Html and mysql..

2004-05-05 Thread Victor Pendleton
Depending on who your intended audience is and what you are attempting to achieve two possibilities are using LiveWire, http://developer.netscape.com/viewsource/kuslich_javascript.html, or you could use Applets that talk to servlets, http://www.onjava.com/pub/a/onjava/2002/02/20/applets.html.

Re: Html and mysql..

2004-05-05 Thread beacker
Josh Trutwin writes: Javascript is a client-side language, the code is executed by the user's browser. It has no way to connect to the database server and run queries so you need to use a server-side programming language like Java (JDBC), PhP, Perl, etc. Tomcat is a decent servlet engine with a