Removing white space of urls with - in cakephp routing?
I have a URL like http://abc.com/users/index/University of Kansas and i want to make it University-of-Kansas. How is it possible via mysql using Cakephp ??? ...
I have a URL like http://abc.com/users/index/University of Kansas and i want to make it University-of-Kansas. How is it possible via mysql using Cakephp ??? ...
Bit of a strange problem here... I've got an update query that isn't working, and I can't for the life of me work out why! My table has two three fields - 'id' (int, auto increment), 'date' (date), and 'amountraised' (decimal). Part of the app I'm developing calculates the fundraising total each week made by a charity bookstall. The 'd...
I have set up replication for MySql server. I can connect from the slave machine the master server using the replication user/password. I have got the slave sql thread running but the slave i/o thread is not running and the slave i/o status comes as empty when checked using 'show slave status'. What could be the problem ? How to solve th...
So I'm working on a framework-esque system with one of my co-workers. Our current challenge is how to best implement statuses. Oftentimes, a status will carry with it unique data (a color for a table row, or text to be displayed to a user. etc). Currently, we have a statuses table which contains all this data. Contained in that table is ...
I have a 'rates' table id | roomTypeId | periodFrom | periodTo | price 1 | 49 | 2010-8-1 | 2010-8-13 | 120 2 | 49 | 2010-8-14 | 2010-8-15 | 170 3 | 49 | 2010-8-16 | 2010-8-31 | 120 ... ... DATA: checkInDate = 2010-8-10 checkOutDate = 2010-8-20 My query $query = null; $query ...
I have a table with a nullable datetime field. I'll execute queries like this: select * from TABLE where FIELD is not null select * from TABLE where FIELD is null Should I index this field or is not necessary? I will NOT search for some datetime value in that field. ...
Hey Guys, I am having trouble with Entity Framework. I created a data model and everything seems to work fine on my local debug machine but when I publish i get the following message System.Data.ProviderIncompatibleException: The store provider factory type 'MySql.Data.MySqlClient.MySqlClientFactory' does not implement the IServiceProv...
I've just started playing with Google App Engine using php via Quercus. I'm not going to be moving my complete app over to app engine, but am thinking of serving up some widgets and api stuff via app engine. At the same time, I will be maintaining my databases in mysql as I've got that running on a seperate server. I make all sorts of...
Hello. I'm having a little trouble getting this query to work: $userId = mysql_real_escape_string( $_SESSION['user_id'] ); $userPassProvided = mysql_real_escape_string( $_POST['oldPassword'] ); $query = "SELECT user_id, AES_DECRYPT( user_pass, '".$db_aes_key."' ) AS user_pass "; $query .= "FROM users_tbl WHERE MATCH( user_id, user_pas...
Our WordPress 2.8.6 installation is returning multiple different errors when trying to edit theme files via wp-admin. The errors are as follows: "Invalid index." "The data area passed to a system call is too small" "The parameter is incorrect." We've tried deactivating all plugins to no avail. We also tried creating a blank "plugins"...
I have this table: CREATE TABLE Persons ( P_Id int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255), PRIMARY KEY (P_Id) ) 1. insert into persons values (1, 'John', 'Smith', 'LA', 'LA'); 2. insert into persons (p_id, lastname, firstname, address, city) values (2, 'John', 'Smith'...
Given the following table structure: CREATE TABLE user ( uid INT(11) auto_increment, name VARCHAR(200), PRIMARY KEY(uid) ); CREATE TABLE user_profile( uid INT(11), address VARCHAR(200), PRIMARY KEY(uid), INDEX(address) ); Which join query is more efficient: #1, SELECT u.name FROM user u INNER JOIN user_profile p ...
If it is how can i query on double and date, I mean there has to be a way to cast them back and them sort them for example. ...
Application Description I have a table which stores id's which represent area's on a map. Each map contains 1000 areas. A territory is any number of area's of a map that are touching. Users fight for ownership of different areas of the map. Database Design Currently I have a table of maps, a table of territories and a table of areas....
Hi, i've set two database conections as below $con1 = mysql_connect("localhost", "root", "pwd") or die (mysql_error()); $con2 = mysql_connect("localhost", "wordpress", "pwd", true) or die(mysql_error()); mysql_select_db("lab_ancp", $con1) or die(mysql_error()); mysql_select_db("wordpress",$con2) or die(mysql_error()); and it works...
How do I get a list of all column names in a table that do not have NULL as their default value? If I do "SHOW COLUMNS FROM table_name", I see there is a column in the results called "Default". I'd like my statement to return ONLY those columns that do not have NULL as the Default. I've tried using a WHERE clause, but I think it choke...
I am trying to get the correct formatting of results back from a Mysql query. When I ignore the NULL values, the formatting is correct, but when I allow null values to be included, my results are messed up. I have the following query I am using: select name,suite,webpagetest.id,MIN(priority) AS min_pri FROM webpagetest,comparefilee...
I'm receiving a date field from a php file, and I need to format it. I get this string: "2009-11-12 17:58:13" I want to convert to "November 12, 2009 5:58:13 pm" I tried to work with the Date class, but I get stuff like this: Type Coercion failed: cannot convert "2009-11-12 17:58:13" to Date. Anyone know of any good utilities for doin...
We have a restaurant table that has lat-long data for each row. We need to write a query that performs a search to find all restaurants within the provided radius e.g. 1 mile, 5 miles etc. We have the following query for this purpose: ***Parameters*** Longitude: -74.008680 Latitude: 40.711676 Radius: 1 mile ***Query*** SELECT * FR...
I'm switching my app from using SQLite to MySQL. It works with SQLite and it's not working now that I've changed it to use MySQL. Here's the error message I'm getting: Message: SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using old authentication What does this mean? Note: I'm running this locally running Snow Leopard,...