I am developing a web application using CakePHP and mysql and all the dates in the system use the Islamic/Hijri calendar(http://en.wikipedia.org/wiki/Islamic_calendar) . I was wondering what is the best way to store Hijri dates in mysql?
Note: I already use Keith Wood's jQuery DatePicker(http://keith-wood.name/datepick.html).
...
I need to list (and later update) all the items present in the table art who are never referenced in the table orders_items
table art
- artID
- artName
Table orders_items
- itemID
- parentID
If i would be looking only by artID=itemID the query is pretty straightforward
select artID, itemID, artName, parentID
FROM art
LEFT JOIN orders...
This is to be an application-agnostic question, but one I'd like to get a better answer on.
What is the best set-up to track users completing a challenge or goal? Think similar to Stack Overflow, where if you hit a certain target you're awarded a badge.
Currently, I'm the developer of a website and attached Facebook application. I want...
I have two tables which have a structure as follows:
`content` (id, foreign_id, type, date_added)
`content_territory` (id, content_id, territory_iso)
The structure of these tables is designed so that you have one content_territory record for every territory that has access to the piece of content. This means that one content item can ...
I am trying to write code for a site for my consulting practice. I know how to have a database and how to manage users on the site. But now I want to charge users for custom features they want me to build from ground up. (e.g they want an option to upload pictures or ability to get certain reports via 3rd party API, which for purposes...
I'm trying to build a search engine for a website. It's mostly a collection of HTML/CSS pages with some PHP. Now that's all there is. All of my content in on the pages.
From what I understand to be able to do this I would need to have the content on a Database, am I correct?
If so I was considering doing as such, creating a MySQL table...
I noticed some queries were running quite slow all of the sudden. After running EXPLAIN on them I realized they weren't using the indexes that I created.
I looked further using SHOW INDEXES and realized that all were disabled except the primary key on the table. I'm certain I didn't disable the indexes manually.
I manually enabled th...
I have couple of php scripts which are called by cron. The cron job runs every 20 mins. Sometimes script finishes the job in few mins and sometimes it takes more than 20 mins.
I want to prevent the race condition here. One way I have in my mind is to use the database set the flag when page is running and remove flag when the job is done...
I am getting this error from the following code:
$result = odbc_connect("DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;Database=$database_name",$database_username, $database_password);
Warning: odbc_connect(): SQL error:
[unixODBC][Driver Manager]Data source
name not found, and no default driver
specified, SQL state IM002 i...
hi,
How do i count null values while making cross tab query?
I have a table with three colums [id, name, answer]
i have following records:
ID NAME ANS
1 ABC 1
1 ABC 0
1 ABC NULL
2 XYZ 1
2 XYZ NULL
2 XYZ NULL
2 XYZ 1
2 XYZ 0
1 ABC 0
now i would like to get my result:
ID Name NULLCO...
This is the settings.py file for python. I set mysql up via macports (mysql5 & mysqldb) The problem is that I am unsure if I have settings.py configuration correct before I sync the db. Should the PORT be left blank? I believe it should. I know on my Mamp install I have it set to 3306. Thanks....
DATABASES = {
'default': {
'...
I have installed MySQL 5.1.49 and the binary QT 4.6.2 for Visual Studio 2008. I configured Qt as follow:
C:\Qt>configure -static -no-webkit -plugin-sql-sqlite -plugin-sql-mysql -I C:\mysql\include -L C:\mysql\lib\optC:\Qt\src\plugins\sqldriver
Everything went fine, no errors. When I run nmake on my application everything runs fine, no...
Using C# & MySQL
When I select the combobox value, the corresponding value should display in textbox
C# Code.
cmd2 = new OdbcCommand("Select name from users where username='" + cmbuser.Text + "'", con);
dr= cmd2.ExecuteReader();
while (dr.Read())
{
txtusername.Text = dr("user");
}
The Abo...
Hi there!
I'm creating an application in RoR and I'm implementing unit testing in all my models.
When I run every test on his own (by running ruby test/unit/some_test.rb) all tests are successful.
But when I run all tests together (by running rake test:units) some tables from both databases (development e test) are deleted.
I'm using...
We're a Windows shop, but have set-up ActiveCollab installed under IIS using a PHP plug-in and having set-up a MySQL database server.
I've just upgraded up to the latest version of ActiveCollab (2.3.1), but I'm having difficultly getting the SVN integration working.
As shown in the screenshot here: (http://www.avonandsomerset.police.uk...
Hey folks, I have a field within a table that I need to do a search and replace on, though it's a bit tricky and beyond my measure of querying skills. Basically, the contents of a field may look like this:
image1.jpg
image2.jpg
image3.jpg
image4.jpg
image5.jpg
I need to do a search and replace that would replace each line with somethi...
Using C# & MySQL
When i select a particular value from the combobox then i clicked the button, the corresponding value should display in the other textbox
code
protected void Button1_Click(object sender, EventArgs e)
{
cmd2 = new OdbcCommand("Select name from users where username = '" + combobox1.Text + "' ", con);
...
I was trying to install Joomla on my machine .. so i ran the microsoft web platform and choose joomla Mysql and other tools went well .. BUT joomla it self isn't installed giving the following error :
This product did not install successfully: the database 'my_site_db' could not be created
Access denied for user 'root'@'localhost' (usi...
Hi all,
In my current setup i have a zend lucene search index which stores the primary keys of my_table rows in the index, along with other unstored fields.
Upon a search the index is queried, the results of which then are looped through and inserted into a mysql temporary table, which is then joined via the primary key onto my_table....
Probably somebody asked that already, but I couldn't find any usefull information and I've never done it before.
So here is the problem.
If I'll get a set of key pairs (DSA public and private keys) with different time validity and unique ID, what is the best way to store them in MySQL-DB using Java?
Is it a good idea at all to store t...