Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Pineco.de:
Basic Eloquent Search Techniques
Mar 28, 2018 @ 17:36:01

The Pineco.de blog has a new tutorial posted that the Laravel users out there will find particularly useful. In their latest post, they introduce some basic Eloquent searching techniques that can be used to easily locate data via currently available Eloquent functionality.

When our app is smaller – for example at the beginning – it’s enough to apply small, handmade solutions. It’s true for database searching as well. It’s not necessary to pull in a package instantly. Most of the time we can use some simple techniques to perform searches in Eloquent.

[...] Searching is a vital part of any application. A good interface helps the user to retrieve the information it needs. So it’s essential to bring a good solution both on front-end and back-end. In this post, we are not covering any UI or front-end related topics. [...] So for now, let’s talk about MySQL and Eloquent only.

In the post, they share a few methods for searching data that don't require any additional service or package. They're mostly just taking advantage of features the MySQL database supports but they're showing how to use them in a Laravel environment:

  • simple "where" clauses
  • using the fuzzy matching of the "like" keyword
  • searching JSON columns by a "path"
  • using "sounds like" to find similar values

Each item on the list comes with a few lines of code showing how to use it via an Eloquent model and a brief explanation of what's happening behind the scenes in the database.

tagged: laravel eloquent search where like json soundslike tutorial mysql database

Link: https://pineco.de/basic-eloquent-search-techniques/

SitePoint PHP Blog:
Liking, Watchlisting and Uploading through Vimeo’s API
Nov 26, 2015 @ 16:26:40

The SitePoint PHP blog continues their series looking at using the Vimeo API from PHP with the second part of their series, enhancing the previous functionality. In this new tutorial they show you how to hook in to the Vimeo API and "like" videos, add them to watchlists and even push them through as uploads.

In a previous post, we used the Vimeo API to build a rudimentary video application with Silex and Twig. We added login and user feed functionality and wrapped it all up with a video searching feature. In this one, we’ll add in liking a video, adding a video to a watchlist for later, and uploading videos via the Vimeo API.

You'll need to have the functionality from part one in place first. From there they take off running, showing you how to interact with videos to perform the "like" and "add to watchlist" actions. The interaction with the API is fired from Javascript on the page and passed through a backend script through to the API. They follow this with the handling for the uploads, using a standard file upload form for input with a few validations once submitted. The code then uses the library to pull in the contents of the file and push it through to the API.

tagged: vimeo api tutorial part2 series watchlist like upload video

Link: http://www.sitepoint.com/liking-watchlisting-and-uploading-through-vimeos-api/

Zend:
Zend Reveals What Music Will Keep Developers Productive (and Happy) This Holiday
Dec 21, 2011 @ 16:06:59

In a new press release to their site, Zend teases at some of the results from their Zend Developer Pulse survey. In these results, they share what music developers prefer (according to the survey) for when they're developing.

The survey showed that as much as 86% of developers listen to music while coding. Of the major music genres, 42% of developers said they prefer coding to music of the rock/pop variety.

The results also included the top artists, some "guilty pleasure" choices and some of the least popular artists. The full results of this survey will be coming out in January 2012, giving a "developer perspective" on the current state of the industry, technology in general and their career.

tagged: music survey developer productive opinion like dislike

Link:

DZone.com:
MySQL PHP search: four-part video tutorial series
Oct 31, 2011 @ 18:09:29

As linked to on DZone.com today, there's a video series about PHP/MySQL and creating a basic search engine from Adam Khoury's collection:

Fresh from Adam Khoury's massive library of instructional videos comes a four-part, full-fledged tutorial on searching a MySQL database using PHP. The tutorials use the 'worked example' format (like Khan Academy), which makes learning relatively painless for newbies and not completely useless for more experienced developers.

The four videos require you to have at least a decent working knowledge of putting PHP and MySQL together and show you how to:

tagged: video tutorial series search union like fulltext mysql searchengine

Link:

DevShed:
The LIKE Clause and the Active Record Pattern
Mar 24, 2009 @ 17:07:39

DevShed continues their look at the Active Record pattern with the next part of their seven part series - extending their MySQL class even further.

In its current incarnation, this class's functionality is limited, regardless of its decent level of SQL abstraction. Therefore, in this fourth part of the series I’m going to enhance it by making it capable of working with LIKE clauses in a straightforward way.

They look at using LIKE to match values in various columns of the tables and add in a fetchLike method that lets you specify the column to search, the pattern to match on and the table to search in.

tagged: like clause tutorial activerecord pattern designpattern fetchlike

Link:

WebReference.com:
How to Create a Search Feature with PHP and MySQL
Aug 07, 2008 @ 12:53:10

On WebReference.com today Ryan Butler has written up a tutorial of a simple search feature that can be integrated into any site (with their content in a MySQL database).

In this article, you'll learn how to create a searchable form feature that will query a database table and display current staff member information. During the analysis you'll learn how to do the following: create a database table that will hold current staff listings, create a search form and use PHP, in coordination with Structured Query Language (SQL) to capture information entered by the visitor and append the information to display the results we want to show.

They give you the files for the project and work through each, showing how to make the database, put information in and connect to the database to run the query. He opts for the LIKE functionality in the WHERE clause to find the term as a wildcard in the FirstName field. It's not the most efficient, but it can be useful.

tagged: mysql search engine like wildcard tutorial

Link:

Jacob Santos's Blog:
Zend Studio Neon
Dec 17, 2007 @ 18:52:00

Jacob Santos has posted a list of things that he both likes and dislikes about one of Zend's beta offerings - Zend Neon.

I've been using Zend Studio Neon for the past three weeks and I have to say, for something that is free (beta software) it is quite good. Compared to using VS 2005, Zend Studio Neon has its advantages, since Visual Studio doesn't handle PHP well. Zend Studio Neon also has areas that I didn't like.

His likes included the fact that it's not Eclipse (technically) and that it supports PHPUnit and PHPDocumentor out of the box. Dislikes included the fact that it might not be free in the future and that it lacks FTP support.

tagged: zendneon beta like dislike eclipse phpunit phpdocumentor free ftp zendneon beta like dislike eclipse phpunit phpdocumentor free ftp

Link:

Jacob Santos's Blog:
Zend Studio Neon
Dec 17, 2007 @ 18:52:00

Jacob Santos has posted a list of things that he both likes and dislikes about one of Zend's beta offerings - Zend Neon.

I've been using Zend Studio Neon for the past three weeks and I have to say, for something that is free (beta software) it is quite good. Compared to using VS 2005, Zend Studio Neon has its advantages, since Visual Studio doesn't handle PHP well. Zend Studio Neon also has areas that I didn't like.

His likes included the fact that it's not Eclipse (technically) and that it supports PHPUnit and PHPDocumentor out of the box. Dislikes included the fact that it might not be free in the future and that it lacks FTP support.

tagged: zendneon beta like dislike eclipse phpunit phpdocumentor free ftp zendneon beta like dislike eclipse phpunit phpdocumentor free ftp

Link:

Brian Moon's Blog:
My Editor of Choice
Oct 10, 2007 @ 16:40:18

Brian Moon has posted today about his editor fo choice for PHP work - jEdit and some of the benefits he thinks it has for other developers.

I keep trying all the latest and greatest editors out there. I fought with Eclipse and have tried the newer more PHP centric offerings built on Eclipse. I recently tried out Komodo Edit for a week. I had tried the Komodo IDE when it came out for Mac a while back. But, I just keep coming back to jEdit.

He's broken it down into two (well, really three) different sections - the likes and dislikes followed by things that he "doesn't care about but you might" (including Subversion and CVS support).

tagged: editor choice jedit review like dislike subversion cvs editor choice jedit review like dislike subversion cvs

Link:

Brian Moon's Blog:
My Editor of Choice
Oct 10, 2007 @ 16:40:18

Brian Moon has posted today about his editor fo choice for PHP work - jEdit and some of the benefits he thinks it has for other developers.

I keep trying all the latest and greatest editors out there. I fought with Eclipse and have tried the newer more PHP centric offerings built on Eclipse. I recently tried out Komodo Edit for a week. I had tried the Komodo IDE when it came out for Mac a while back. But, I just keep coming back to jEdit.

He's broken it down into two (well, really three) different sections - the likes and dislikes followed by things that he "doesn't care about but you might" (including Subversion and CVS support).

tagged: editor choice jedit review like dislike subversion cvs editor choice jedit review like dislike subversion cvs

Link:


Trending Topics: