Wimpy SQL ED Configuration

Open the "configuration" file (wimpy.sql.ed.configs.php) in a text editor and edit the variables as described below.


$host        = "localhost";
$db          = "mp3s";
$publicUser  = "root";
$publicPwd   = "hackme";
$table_files = "wimpy";


This is traditionally set to localhost. Only change this is you are intimate with MySQL and know exactly what to set it to.


The name of the database you would like to use. This database should already be set up -- Wimpy can not create a database for you.


MySQL PUBLIC username and password. NOTE: The username and password that you use should have limited access to MySQL. It is a good idea to set up a user/password that only has read-only access.


The name of the DB table that contains all the file information.



In this section we are establishing a relationship between your existing database architecture and the information that Wimpy needs to operate. Set the "myField" variables to the corresponding COLUMN names (or field names) in your existing MySQL table.

By default, the setup is as follows:

$myField_ID     = 'id';
$myField_File   = 'filepath';
$myField_Artist = 'artist';
$myField_Title  = 'title';
$myField_Image  = 'visual';
$myField_Link   = 'comments';

An example of what your setup may look like after editing the variables would be:

$myField_ID     = 'file_id';
$myField_File   = 'file_name_base';
$myField_Artist = 'band_name';
$myField_Title  = 'track_title';
$myField_Image  = 'cover_art_filename';
$myField_Link   = 'cart_url';

Where the value of each corresponds to the name of the field that you used to establish your existing MySQL database table.

If you do not have a column in your MySQL table that refers to the values that Wimpy can use, leave the value as an empty string. For example, if you do not have a column in your table that refers to a graphic that can be used in the cover art container box, you would set the reference for "myField_Image" to an empty string as:

$myField_Image = '';



A unique ID for each row. Each item / row in your database table should have a unique field.



Data from this field will be used to actually play the MP3 file. You can use either a URL (preferred) OR a System Path.*

URL .(preferred)

An example of a URL would be:

If your database does not have a field that contains a full URL, and only has a reference to the file name, you can use the $appendPath option to "tack on" a path to the base file name.

We do not recommend using "relative" paths nor /from/the/web/root/paths. Try and use a "Fully Qualified URL."

System Path

An example of a "System path" would be:


* IMPORTANT: The "Prevent files from caching" option (serveMP3) must be established in the HTML code that presents the player if you are using a System Path.

By default, the myWimpy.php file included in the Wimpy SQL ED package does NOT have this option enabled. You must use the Customizer tool to create a new "myWimpy.php" page that includes the "Prevent files from caching" option.

See the "Customizing Wimpy SQL ED" section below for more information on generating a new myWimpy.php page for use wimpy Wimpy SQL ED.



The artist's name will appear only when the file is playing.



Titles of tracks appear in the playlist and also scroll with the artist name when the track is playing.



Refers to a URL to a JPG or SWF graphic for use in the Cover Art container box.

An example of a URL would be:



Refers to a URL that is used as a hyperlink on the cover art. If the "ecommerce" option is enabled, this URL will be used on the shopping cart icon to the right of each track in the playlist.

An example of a hyperlink would be:

NOTE: If your hyperlink contains special characters such as & and ?, these characters should be URL encoded.


Would be properly URL encoded as:





Will "tack on" the contents of appendPath to the front of the file name.

For example, :if appendPath is set to:

$appendPath = 'http://www/path/to/';

... and you've assigned "filename" to a field that only uses the "base file name" of "myTrack.mp3" the URL Wimpy will use to play the file will be:


This is also useful if you have a script that does additional processing on the server side. For example, you can set appendPath to something like:

$appendPath = 'http://www/path/to/script.php?process=';

... the result would be that Wimpy will issue a request to play the track as:

$appendPath = 'http://www/path/to/script.php?process=myTrack.mp3';




Some databases are set up where the path to the file is in one field (or column) and the "base name" for the file is in another field. You can use this option to concatenate (or "join") the two fields at runtime.

For example, if your database is set up where there is a field defined as "my_directory" and another field as "my_basename" and you want to "build" the URL (or System Path) to the file by joining the two fields, you can do so by setting appendField to "my_directory" and setting $myField_File to "my_basename" as:

$myField_File = 'my_basename';
appendField = 'my_directory';

This will cause wimpy.sql.ed.php to "tack on" the contents of appendField to the front of the contents of whatever is defined for filename.

For example, if $myField_File is assigned to "my_basename" which is a field in your MySQL table that only contains the base name of a file such as: "myTrack.mp3," and appendField is assigned to a field named 'my_directory' that contains the directory path where the file is located such as "/path/to/album/", the resulting path that Wimpy will use to access the file will be essentially:

'my_directory' + 'my_basename'

or for our example:

/path/to/album/  +  myTrack.mp3

resulting in:




Ensures that appendPath and appendField builds the URL or System Path to the file using a "slash" between the appended string and the file name.

Set to either TRUE or FALSE.

$forceTrailingSlash = TRUE;
$forceTrailingSlash = FALSE;

By default, this is set to FALSE.

This option is available because some databases store the path to files without using a trailing slash in the reference to the directory. So when Wimpy SQL ED "builds" the path to the file by appending either appendPath or appendField, this option ensures that there is a "slash ( / or \) between the directory and the file name.

For example, if you database stores directory data about a particular file as:


... and you are using appendField, which uses the base name of the file stored in your database as:


... if forceTrailingSlash was left as FALSE the resulting path to the file would be:


(Notice that there is no slash between the directory name and the file name?)

... whereas if forceTrailingSlash was set to TRUE the resulting path to the file would be set correctly as:


NOTE: forceTrailingSlash will discern between Unix forward slashes ( / ) and Windows backslashes ( \ ).










  ©Copyright Plaino LLC. All rights reserved.