Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
Curwe Support #1
Will this work
Hi all,
I was wondering if it is possible to format variables from within the VALUES
section of a mysql INSERT string.
I have some variables that are passalong from a script and get deposited to
a mysql db.
since end users can submit in all uppercase or lower case, i was looking for
some data normalization.
so I am going to apply ucwords(strtolower($variable1));
but in the name of keeping the script as small and sweet as possible can i
do
mysql_query ("INSERT INTO 10m (firstname, lastname, zipcode, email, 10mdate,
entrydate, termsagree)
VALUES ('ucwords(strtolower($firstname));',
'ucwords(strtolower($variable1));', '$zipcode', '$email',
'$month--$day-$year', '$entrydate', '$termsagree')");
etc etc.
or do i have to do
$fixed_variable1=ucwords(strtolower($variable1));
$fixed_variable2=ucwords(strtolower($variable2));
mysql_query ("INSERT INTO 10m (firstname, lastname, zipcode, email, 10mdate,
entrydate, termsagree)
VALUES ('$fixed_firstname', '$fixed_lastname', '$zipcode',
'$email', '$month--$day-$year', '$entrydate', '$termsagree')");
i think you get the idea.
i would prefer the former vs the latter since there are about 10 variables
to rewrite....
Cheers,
Gary
Curwe.com
Curwe Support Guest
-
Can't get <img> to work in XML
I'm using PHP to grab info from a database and then spit out an XML file. I'm loading the XML file into my fla and having no problems getting the... -
Links don't work in Shockwave movie but work in p
Hi, everyone: I encountered a strange problem. I downloaded a sample movie from Macromedia site and noticed that the same problem occurs what I had... -
F12 doesn't quite work
I press F12, and the page displays locally, but the included files (PHP) don't get included. I could've sworn it was working, once upon a time. Now,... -
Still trying to get a Mac to work with GPS
I am still trying to get a Mac to work with GPS. All of the leads so far suggested have not pointed me towards a soltion, allowing the use of a Mac... -
Net work set up
1)i have 2 computers both with a network card connected by cable. 2) when running main (internet)computer XP home o/s 2nd computer 98 o/s the 2... -
Jon Kraft #2
Re: Will this work
Curwe Support <support-nntp@curwe.com> wrote:
Hi Gary,> I was wondering if it is possible to format variables from within the
> VALUES section of a mysql INSERT string.
>
> mysql_query ("INSERT INTO 10m (firstname, lastname, zipcode, email,
> 10mdate, entrydate, termsagree)
> VALUES ('ucwords(strtolower($firstname));',
> 'ucwords(strtolower($variable1));', '$zipcode', '$email',
> '$month--$day-$year', '$entrydate', '$termsagree')");
Not quite in this form, but there is a solution. I suggest though you
construct the statement string beforehand. Gives a much cleaner code layout
and more control. And in case you use an editor with highlighting you'll
see another benefit.
$SQL = "INSERT INTO 10m (firstname, lastname, zipcode, email, " .
"10mdate, entrydate, termsagree) VALUES (" .
"'".ucwords(strtolower($firstname))."', " .
"'".ucwords(strtolower($variable1))."', " .
"'".$zipcode."', " .
"'".$email."', " .
"'".$month."-".$day."-".$year."', " .
"'".$entrydate."', " .
"'".$termsagree."')";
mysql_query($SQL) or die (mysql_error()."<br />".$SQL);
HTH;
JOn
Jon Kraft Guest
-
JimmyUK #3
Will This work
[url]http://www.macromedia.com/cfusion/exchange/index.cfm?view=sn111&extID=1029986#lo[/url]
c=en_us&view=sn111&extID=1029986&viewName=Flash%20 Extension&avm=1
hi this is probably a stupid question but i was looking at this and wondered
would it work in Dreamweaver MX i know it's not the most up to date dreamweaver
and as it requires flash 8 for it to work i take it won't work on my
dreamweaver version but just wondered please help many thanks Jimmy
JimmyUK Guest



Reply With Quote

