Re: Your opinion needed
| From: | Randum Ian | Date: | Thu, 15 May 2003 09:54:09 +0000 |
| Subject: | Re: Your opinion needed | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147682@lists.php.net to get a copy of this message | ||
IMO Nothing beats a good text editor with PHP colour coding. For this I use
EditPlus which is perfectly good enough for my needs.
Think of it like this - is cruise control REALLY all that necessary?
> Ryan,
>
> My experience with these types of auto code writers are that they are
> great when it is prototype write quickly situations but in the long
> term you need to know what you code is really doing.
>
>
> Timothy Hitchens (HiTCHO)
> Web Application Consulting
> e-mail: tim@hitcho.com.au
>
> Thursday, May 15, 2003, 7:13:31 PM, you wrote:
>
> RA> Hi,
> RA> I have just started working with Dreamweaver MX -> PHP/MySql and
> need your RA> opinion.
> RA> The advanage of using DWMX with PHP/MySql is of course speed, I can
> write RA> scripts to insert/delete/edit etc in seconds and they execute
> perfectly with RA> or without magic_quotes or globals, this would
> normally take me an hour or RA> more, those headaches are taken away
> from me *BUT*
> RA> for every little operation (insert/delete etc) it writes around
> double or RA> more of what I would normally write (bloatware...?)
>
> RA> My question is....do you think it is worth it? or should i go back
> to RA> writing everything by hand in its codeview/notepad/some editor??
>
> RA> Most of you guys are more experienced than me in PHP so.....your
> opinion RA> needed.
>
> RA> To give you an example of what i mean here is the code that was
> generated RA> for me to do a simple insert into 2 fields of a table,
> the database/php etc RA> is on my local win2000 machine, not on the
> web.
>
> RA> <?php require_once('Connections/test.php'); ?>
> RA> <?php
> RA> function GetSQLValueString($theValue, $theType, $theDefinedValue =
> "", RA> $theNotDefinedValue = "")
> RA> {
> RA> $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) :
> $theValue;
>
> RA> switch ($theType) {
> RA> case "text":
> RA> $theValue = ($theValue != "") ? "'" . $theValue .
> RA> "'" :
> "NULL"; RA> break;
> RA> case "long":
> RA> case "int":
> RA> $theValue = ($theValue != "") ? intval($theValue) : "NULL";
> RA> break;
> RA> case "double":
> RA> $theValue = ($theValue != "") ? "'" .
> RA> doubleval($theValue) .
> "'" : RA> "NULL";
> RA> break;
> RA> case "date":
> RA> $theValue = ($theValue != "") ? "'" . $theValue .
> RA> "'" :
> "NULL"; RA> break;
> RA> case "defined":
> RA> $theValue = ($theValue != "") ? $theDefinedValue :
> RA> $theNotDefinedValue;
> RA> break;
> RA> }
> RA> return $theValue;
> RA> }
>
> RA> $editFormAction = $HTTP_SERVER_VARS['PHP_SELF'];
> RA> if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
> RA> $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING'];
> RA> }
>
> RA> if ((isset($HTTP_POST_VARS["MM_insert"])) &&
> ($HTTP_POST_VARS["MM_insert"] RA> == "form1")) {
> RA> $insertSQL = sprintf("INSERT INTO countries (country_code,
> country_name) RA> VALUES (%s, %s)",
> RA>
> GetSQLValueString($HTTP_POST_VARS['country_code'], RA> "text"),
> RA>
> GetSQLValueString($HTTP_POST_VARS['country_name'], RA> "text"));
>
> RA> mysql_select_db($database_test, $test);
> RA> $Result1 = mysql_query($insertSQL, $test) or die(mysql_error());
>
> RA> $insertGoTo = "countries.php";
> RA> if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
> RA> $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" :
> RA> "?";
> RA> $insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
> RA> }
> RA> header(sprintf("Location: %s", $insertGoTo));
> RA> }
> ?>>
>
> RA> Kindly reply.
>
> RA> Cheers,
> RA> -Ryan.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Randum Ian
ian@randumian.co.uk
DancePortalGlobal Webmaster
http://www.danceportalglobal.com