
eazyGen
Members-
Posts
41 -
Joined
-
Last visited
Never
About eazyGen
- Birthday 11/24/1964
Contact Methods
-
Website URL
http://www.eazy-gen.com/
Profile Information
-
Gender
Male
-
Location
Central London
eazyGen's Achievements

Member (2/5)
0
Reputation
-
Many thanks, Sorry to appear lazy, but I was in a mad rush. S
-
Hi guys, I would normally research this myself, but I am in a hurry just now. My question is - how would I take a string like: "Customer Name" or "Product Cost Price" and produce a result where all upper case letters are made lower case and all spaces replaced by under-scores. Like this: "Customer Name" would become "customer_name", and "Product Cost Price" would become "product_cost_price" Many thanks for any swift help, S
-
It is not that simple when the app I am building will be used by others whose hosting I cannot dictate. Ergo - I need to consider the most basic set of features around and proceed on that basis. NOT simple at ALL.
-
Hi Guys, I am building an app that I know will be deployed on a LAMP server but where I am not in control of the MySQL database engine. It could be InnoDB or it could be MyISAM. Or it could be something else for that matter. My app has some pretty complicated updates that are tightly related and represent what folk call a “transaction”. In other words, and in an ideal world, all my updates should succeed or none should. The classic example is the bank transfer: UPDATE account1 SET balance=balance-500; UPDATE account2 SET balance=balance+500; Both or none please. I have been reading up on MySQL transactions, commit and rollback etc; and I am seeing what I would more or less expect (my background is with IBM's DB2). However, I have been searching around, and, from what I have read thus far, it seems that MyISAM does not support row level locking - only table locks (which is madness in my book). So I thought I would ask here how folk achieve guaranteed transaction integrity if they are forced (by the host for example) to use MyISAM. Or do you just put up with this db engine limitation? Many thanks in advance. S
-
How exactly did you notice that, because the method used could be giving you false information or could be converting the value. I beg your pardon, I think I may have misled you. I made use of the function mysql_insert_id() and then ran it through a debugger. The debugger I used was the one that comes with PhpED: http://www.nusphere.com/products/php_debugger.htm The result was a value of "long". I then ran this code: $qry = "SELECT LAST_INSERT_ID()"; $b = mysql_query($qry); and $b ended up with a type of mysql result. Perhaps I am doing something wrong here. My most important issue is that I must know the type of the integer that comes out of the code as I need to populate a BIGINT with a length of 13. I have searched around but I cannot seem to find a great deal of clarity on this topic. If I cannot get this method to work, I may have to use a different technique. Any comments most welcome. S
-
Back again on this chaps. I have looked at the documentation for mysql_insert_id() and it says: mysql_insert_id() will convert the return type of the native MySQL C API function mysql_insert_id() to a type of long (named int in PHP). If your AUTO_INCREMENT column has a column type of BIGINT (64 bits) the conversion may result in an incorrect value. Instead, use the internal MySQL SQL function LAST_INSERT_ID() in an SQL query. I have a bigint as the key if my table, so I looked at the LAST_INSERT_ID(). However, during testing I noticed that LAST_INSERT_ID() returned a value with a type of long, which I believe has a maximum value up to: 2,147,483,648. So this doesn't seem to be the solution. Has anyone overcome this issue? Many thanks in advance. S
-
Looks good - thank you. More information: http://uk3.php.net/mysql_insert_id S
-
Hi Guys, Using MySQL, I have a table with an auto increment key. I add rows to this table happily enough. However, is there a simple way of obtaining from the db the value that was allocated by the auto increment? Many thanks in advance, S
-
== How can your page be wider? This is all controlled by your browser FF and that should be the same size wither displaying a local file or one from the internet. Maybe your environment on your computer displays in FF differently that true FF via the internet. Maybe your zoom is set wrong. Hit ctrl-zero to reset that and check internet again. Well I'll be jiggered. You prompted me to play around with the zoom settings. I zoomed out once and the page was fine. I then closed the browser, re-opened it and went back into my test page and it was still good. I visited a few other web pages and they were fine too. This would seem to mean that zoom settings are stored for each page on FF ? I must have zoomed in on my test page either by accident or for some reason, not realising my zoom would persist across browser settings. Is that right behaviour would you say? Either way, many thanks for pointing me in the correct direction. S
-
Definitive way of obtaining the root directory.
eazyGen replied to eazyGen's topic in PHP Coding Help
Thank you both. There is good food for thought here. S -
Definitive way of obtaining the root directory.
eazyGen replied to eazyGen's topic in PHP Coding Help
If that is the case, and I must say I find it slightly odd that something so apparently simple should not come with a guarantee, is there a "best practice" to achieve what I am aiming for? Perhaps a settings.ini file??? S -
Definitive way of obtaining the root directory.
eazyGen replied to eazyGen's topic in PHP Coding Help
Many thanks. However, this seems to highlight the problem I am having and the reason for my post. The link has two statements that concern me: $HTTP_SERVER_VARS [deprecated] ... so I cannot use that. "$_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these ..." I am loathe therefore to pursue a solution that carries no guarantees. Any further thoughts much appreciated. S -
Hi guys, I am searching for the definitive way of obtaining the root directory of my app. I need to it to work on localhost and also on ALL platforms, NIX, Windows etc. I would like to do this as I wish to use it to locate all my sub directory files - includes, model etc. For example, I may have this as my landing page: http://www.mywebsite.com/index.php The root directory might be: html The index.php might reside here: html/index.php ... but my includes files might be here: html/lib/includes So I would be looking to obtain the root in an absolute kind of way to allow me to string together the includes sub directory in a relative kind of way. In summary then: 1. How to obtain the root with 100% percent success, all of the time on all platforms. 2. How to string the sub directory together with 100% percent success, all of the time on all platforms. 3. Any comments on this as an approach, also welcome. Many thanks in advance, S
-
Project Directory Structures - Please pick holes
eazyGen replied to eazyGen's topic in Application Design
Thank you kindly sir. I just wrapped __autoload into my app and it is working nicely. I appreciate your thoughts and comments. S -
Thanks for getting back to me. Here is the whole page - it is small - a simple log in with little validation at this time: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-gb"> <head> <title>Login to eazyGen</title> <meta name="description" content="eazy-Gen" /> <meta name="keywords" content="Code Generator" /> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="generator" content="eazy-Gen" /> <meta name="robots" content="index,follow" /> <link href="../client/css/ezLogin.css" rel="stylesheet" type="text/css" /> <link href="../client/css/ezControls.css" rel="stylesheet" type="text/css" /> <link href="../client/css/ezFacts.css" rel="stylesheet" type="text/css" /> <link href="../client/css/ezGlobalCSS.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="../client/images/logos/favicon/favicon.ico" type="image/x-icon" /> <link rel="icon" href="../client/images/logos/favicon/favicon.ico" type="image/x-icon" /> </head> <body id="body"> <!-- Body --> <div id ="ezContainer"> <!-- Outer Container --> <div id = "ezHeaderLogo"><img src="../client/images/logos/eazygen_logo.gif" alt="eazyGen Logo" title="eazyGen - the Web Site Generator" height="52" width="82" /></div> <div id = "ezHeaderText">eazyGen - The Web Site Generator</div> <div id = "ezHeaderLine"><hr></hr></div> <form id="ezLoginForm" method="post" action="ezLogin.php"> <!-- Log In Form --> <p><label for="username" class="formLabel">Username :</label> <input type="text" name="username" id="username" class="formInput" value=""/></p> <p><label for="ipassword" class="formLabel">Password :</label> <input type="password" name="password" id="ipassword" class="formInput"/></p> <p><input type="submit" name="submit" value="Login" class="ezButton"/></p> </form> <!-- End Log In Form --> </div> <!-- End Outer Container --> </body> <!-- End Body --> </html> And here is the main CSS for the page: This is the CSS - I have commented out the selectors and classes to aid posting into the forum !!! /* Log In Style Sheet */ /* This contains the whole page. */ /* Header */ //#ezHeaderLogo { padding-left:10px; padding-top:10px; float: left; } /* End Header Logo */ /* Header Text */ //#ezHeaderText { padding-right:10px; padding-top:10px; padding-bottom: 0px; font-family: helvetica, courier; float: right; font-size: 24pt; color: #0D658E; } /* End Header Text */ /* Decorative Line */ //#ezHeaderLine { padding-right:5px; padding-top:0px; width: 55%; height: 2px; float: right; color: #0033CC; } /* End Decorative Line */ /* Main Container */ //#ezContainer { width: 1024px; height: 1000px; padding: 0; margin-top: 0; margin-right: auto; margin-bottom: 0; margin-left: auto; background-color: #ffffff; border: solid 2px; border-color: #575757; } /* End Main Container */ /* The Form */ //#ezLoginForm { position:relative; border-radius: 25px; box-shadow: 2px 2px 4px grey; margin-top: 200px; margin-left: auto; margin-right: auto; border: 1px solid #BEBEBE; width: 600px; height: 180px; padding: 50px; } /* End The Form */ //#ezLoginError { margin-left: auto; margin-right: auto; } /* Body Style */ //#body{ background-color: #c0c0c0; background-image: url("../images/decoration/binary.jpg"); background-image: repeat; margin: 0%; } /* End Body */ Any further assistance much appreciated. S