Posts Tagged ‘PHP’
Thursday, July 24th, 2008
In order to do some of our tutorials (or program with PHP and MySQL in general) you need to be able to run PHP and MySQL. Although most free hosts do not have PHP and MySQL support there are some that do, and there are also many low cost hosting options available. If you already have hosting and are unsure if you have PHP and MySQL support you should contact your host directly. If you are shopping for hosting be sure that they support PHP and that your package includes at least one MySQL database.
Another option is to install PHP and MySQL directly onto your Windows computer. If you are a Mac user you already have the capability and just need to activate PHP and MySQL.
Tags: activate, Although, capability, Computer, database, Directly, MySQL, package, PHP, running, support, windows
Posted in MySQL, PHP, tricks | No Comments »
Thursday, July 24th, 2008
PHP and MySQL compliment each other to do with neither can do alone. PHP can collect data, and MySQL can in turn store the information. PHP can create dynamic calculations, and MySQL can provide it with the variables it uses. PHP can create a shopping cart for your web store, but MySQL can then keep the data in a format PHP can use to create receipts on demand, show current order status, or even suggest other related products.
Although PHP and MySQL can each be used independently, when you put them together it opens up countless possibilities for your site. As the internet progresses, it becomes more and more necessary to deliver dynamic content to keep up with the demands of web surfers and their desire to have information instantly delivered to them online. By learning to use PHP and MySQL you can deliver this information to them on demand.
Tags: calculations, demand, independently, information, learning, MySQL, online, PHP, Status, together
Posted in MySQL, tricks | No Comments »
Thursday, July 24th, 2008
MySQL is a relational database system that is used to store information. MySQL can store many types of data from something as tiny as a single character to as large as complete files or graphics. Although it can be accessed by most programing languages, it is often coupled with PHP because they work together with ease.
Information stored in a MySQL database hosted on a web server can be accessed from anywhere in the world with a computer. This makes it a good way to store information that needs the ability to change over time, but also needs to be accessed over the net. Some examples that can utilize MySQL are a web message board or a customer’s shipping status.
Tags: accessed, database, Graphics, MySQL, PHP, together, Web Server
Posted in MySQL, tricks | No Comments »
Thursday, July 24th, 2008
PHP is a scripting language that is often imbedded into HTML to add functions HTML alone can’t do. PHP allows you to collect, process and utilize data to create a desired output. In short, it let’s you interact with your pages.
PHP is able to preform a number of tasks including printing data, making numeric calculations (such as addition or multiplication), making comparisons (which is bigger, are they equal, etc) and making simple boolean choices. From this you can create more complex loops and functions to make your page generate more specialized data.
Tags: bigger, calculations, functions, html, loops, multiplication, numeric, output, PHP, scripting language
Posted in PHP, tricks | No Comments »
Thursday, July 24th, 2008
PHP and MySQL combine to be an easy yet powerful way to create dynamic web pages that actually interact with your visitors. HTML can create useful and well formatted web pages. With the addition of PHP and MySQL you can collect data from your users, create specific content on the fly, and do many other things that HTML alone can’t do.
The beauty of PHP as a language is that it is designed to be used along with HTML. You can use PHP right inside your already existing HTML content, or put HTML tags right inside your PHP coding. When learning PHP you are not making your existing HTML knowledge obsolete, you are instead adding to it to give it more functions and abilities.
Tags: abilities, collect, designed, html, knowledge, learning, MySQL, obsolete, PHP, users, web pages
Posted in MySQL, PHP, tricks, web designing | No Comments »
Thursday, July 24th, 2008
MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, 1998, MySQL is now one component of parent company MySQL AB’s product line of database servers and development tools.
Many Internet startups became interested in the original open source version of MySQL as an alternative to the proprietary database systems from Oracle, IBM, and Informix. MySQL is currently available under two different licensing agreements: free of charge, under the GNU General Public License (GPL) open source system or through subscription to MySQL Network for business applications.
MySQL runs on virtually all platforms, including Linux, Unix, and Windows. It is fully multi-threaded using kernel threads, and provides application program interfaces (APIs) for many programming languages, including C, C++, Eiffel, Java, Perl, PHP, Python, and Tcl.
MySQL is used in a wide range of applications, including data warehousing, e-commerce, Web databases, logging applications and distributed applications. It is also increasingly embedded in third-party software and other technologies. According to MySQL AB, their flagship product has over six million active MySQL installations worldwide. Customers include Cisco, Dun & Bradstreet, Google, NASA, Lufthansa, Hyperion, and Suzuki.
Tags: API, applications, C, customers, Definition, Eiffel, google, Java, MySQL, Perl, PHP, programming languages, Python, Software, Tcl, technologies, version, worldwide
Posted in MySQL, tricks | No Comments »
Thursday, July 24th, 2008
Before you start coding your application with PHP or whatever remember to test out your MySQL in your MySQL GUI such as SQLYOG or even the CLI
What are the advantages?
* You don’t have to worry about the Script/MySQL syntax clashes (quoting etc)
* You only have to think MySQL and not say PHP as well
* You can see the data produced or not produced
* You can test your concepts
Tags: advantages, coding, concepts, GUI, MySQL, PHP, produced, queries, remember, Script, Syntax
Posted in MySQL, tricks | No Comments »
Tuesday, July 15th, 2008
My ‘day job’ has nothing to do with PHP. It has nothing to do with any form of programming. I graduated in 2006 with a degree in Biochemistry and went on to do a MSc and now PhD in cardiovascular biology. The closest most of my colleagues come to programming is a formula in an Excel spreadsheet.
It was actually Excel which prompted this post. Yesterday I was analysing some data and bemoaning the poor search functionality that Excel makes available. I had already expanded the small set of experimental data I had with some values pulled from a web service using a quickly hacked together PHP script and it got me to wondering how much better things could be if I just stuck with PHP.
Where’s the science?
This train of thought led on to whether PHP has been used all that often for scientific projects. There is an accelerating trend in Biology to make data and tools available via web interfaces. In my opinion this is an environment where PHP excels and yet all the literature I’ve seen discussing the development of these services uses Perl or occasionally Java.
Searching a little harder for PHP projects yields an equally depressing outlook. In PEAR Jesus Castagnetto released the Science_Chemistry and Math_Stats packages back in 2003. For my purposes though the Chemistry package is a little too ‘chemical’ and the stats package is a little too basic. In sourceforge there is a package named BioPHP which looks promising but again there has been no activity since 2003. A lot has happened since then.
Biology is increasingly data generative. There is going to be a steadily increasing need for tools to analyse all this data. These are likely to be centralised and made available via web interfaces.
Anyone out there?
I suspect I’m going to be increasingly creating automated solutions to remove some of the repetition involved in processing the, relatively, small amounts of data that I generate. A PHP toolkit able to leverage the latest online databases and perform ‘advanced’ statistics would be immensely valuable.
So my question is this. Is anyone out there using PHP in a scientific environment? Are there resources available which I’ve missed?
Tags: actually Excel, analysing, available, bemoaning, colleagues, Data, day job, depressing, development, enough, Excel, expanded, experimental, formula, functionality, good, graduated, Jesus, PHP, Programming, prompted, science, Script, small set, spreadsheet, wondering
Posted in SEO, google | No Comments »
Tuesday, July 15th, 2008
Finally lets look at modifying the environment. I actually cheated here and just set the max execution time to 60 seconds a million times. I think the result is still valid though
ini_alter vs ini_set
ini_alter: 103.332370043 seconds
ini_set: 86.2883789539 seconds
Time saved: 17.0439910889 seconds; 19.7523598143%
As might be expected these functions are expensive when it comes to execution time. That 17 microsecond saving is massive as well making ini_set the superior choice.
Tags: alter, execution, expensive, microsecond, modifying, PHP, seconds, time, vs
Posted in PHP, tricks | No Comments »
Tuesday, July 15th, 2008
This one really surprised me. I expected these functions to be faster. Both these functions allow you to convert an array into a string. implode is the opposite of explode and join allows you to join the items in an array with a ‘glue’ string. In this case the array had 100 items.
implode vs join
implode: 47.2712550163 seconds
join: 50.1287050247 seconds
Time saved: 2.85745000839 seconds; 5.70022705949%
5% doesn’t seem like all that much but 2 microseconds shouldn’t be ignored.
Tags: explode, faster, functions, glue, implode, items, join, PHP, seconds, String
Posted in PHP, tricks | No Comments »