A very basic database design question: I'm creating a very large table with the following columns: Employee_Name(VARCHAR), Employee_ID(INT), Employee_Birthday(INT). I wish to create a single column b-tree index for Employee_ID, as many of my queries
because I'm pretty new to JS, I can't understand how to implement multiple data series into my code Here is my php page that I use as data grabber: getTrendData-TIMEREQUESTED-hms.php <?php //Define possible Argument request $format = $_GET['format'];
Consider the following regex @(.*\..*){2,} Expected behaviour:
[email protected] doesnt match
[email protected] doesnt match
[email protected] matches
[email protected] matches and so on Testing in regexpal it works as expected. Using it it in a mysql select doesn't work as expected. Query: SE
I have a MySQL (actually MariaDB) query which is running much slower and falling back on filesort when I try sorting by a DATETIME field (sighted) instead of the primary key. I have an index on sighted, but for some reason it does not seem to be usin
I have 2 tables "quizzes" & "users", I need to return list of first user took each quiz, with quiz_id: tables structure "quizzes" structure: id name 1 England 2 france 3 Japan 4 USA 5 UAE 6 Sweden 7 Italy 8 Brazil 9 South
update my_table set limit_id = 2 where id='176846'; start transaction; update my_table set limit_id = 1 where id='176846'; update my_table set limit_id = 4 where id='176846'; -- <- this one fails commit; select limit_id from my_table where id='176846
i am trying to figure out the syntax problem in my query the block of code goes like this: $updatequery = "update patient_dim set dentist_id = $dentist_id where". "patient_id = $patient_id"; $queryResult = mysql_query($updatequery,$con
This question already has an answer here: How to install JDBC driver in Eclipse web project without facing java.lang.ClassNotFoundexception 13 answers Below is the code that works perfectly fine when it is executed from main (ie in eclipse RunAs java
I changed my server time using this command cp /usr/share/zoneinfo/US/central etc/localtime Ever since I changed the server time. All my MySQL records have changed the timestamp fields 6 hours ahead. I tried changing the time back and the records won
I have a query where all products sold are being selected. What I want to do is reverse the query and get all product not sold within a period of time. This is the query for all the products sold within a period of time. SELECT product.product_id, pr
I´m building a grid mechanism where I need to retrieve data from Database the total or records found, retrieving just a range of these records with a row_number in it. I´m using SqlServer for testing, but I need to support that on Oracle and MySql as
I have a website with 4 pages: Home Page , Sale Page , Rent Page and Contact Us Page. On the Home Page is a Search Form that need to Search the Options they select. It is a Property website so if they click on the search button they need to be taken
I have a registration script that doesn't work. It used to work but then suddenly it stopped working. I dont know what I've done or what happend. I have tried for like an hour now to find out where the problem is, but I can't seem to find it. What ha
i want to get data from my database where one field is max, at this moment i do this in 2 queries. the thing is i dont want to overload the server so i am looking for a way to make it in 1 query. any suggestions? as you can see i am looking for entry
I have 10 files containing anywhere from 50 to 250 rows each. I need to be able to pull 1 or more random rows from different files. I currently do this... $lines = file($filePath); if ($number == "1") { return $lines[array_rand($lines)]; } else
Given the following table: id category_id categorizable_id categorizable_type 66 22 67 Image 72 22 75 Image 74 15 71 Image 104 15 67 Image 126 15 113 Image Now i want to select those "Images" via a left join who's category_ids are 22 and 15 My s
I'm developing a PyQt program that will soon switch from an xml type backend to one hosted on a local MySQL server. I've been trying to read around about each of the three options, but thought it might be best to ask ye SO gods. My current experience
I currently have two tables, one is products and the other is options (colour, size, etc). If no options are specified for the product, it puts the stock against the product table Otherwise it will put the stock against the option table Tables look a
I find myself in a situation that someone else must have got stuck in at some point. Our company runs an in house MSSQL based database, our website then sits on an external server and currently runs MySQL. The problem comes that both databases need t
My application is getting a lot of database calls hence I need to start using a distributed master/slave mysql database but I'm having problems configuring play framework! so my first question is that if it is actually possible to configure hibernate
I'm having some trouble searching for any similar match in two fields. For example I have a table with the values: CAR MAKE CAR MODEL Ford Mustang (Shelby) Toyota Corolla Seat Leon etc etc. I want to be able to get the result "Ford, Mustang (Shelby)&
I have two basic queries which I need to sum the totals of: Select hours, sum(hours) FROM table WHERE name='xxx' and Description='Worked' Select hours2, sum(hours2) FROM table WHERE name='xxx' and Description2='Worked' I've tried UNION and it will ge
i was wondering if any one can help me with my php-mysql design my current app. (is a more or less survey app) it let users store questions about targeting specific features in other products also saved in other table in database ! for example , a us
is there a more efficient way of doing the following? $total_a = mysql_query("SELECT `id` FROM `table` WHERE `this` = 'that'"); $total_b = mysql_num_rows($total_a); if(!$total_b) { echo 'no results'; } else { $a = mysql_query("SELECT `id`,
I have been taken in to provide some SEO guidance on a website which has been running since 2005. My problem is I want to use clean URLs. The code that handles the URL is hidden away in some class file. And with over a few thousand lines of code its
I'm having some issues using mysqli to execute a script with SELECT,DELETE,INSERT and UPDATE querys. They work when using norm mysql such as mysql_connect but im getting strange results when using mysqli. It works fine with a lot of the SELECT querys
I made a php/ajax/mysql/json script for my site, to show all the tags. If I GET the page id it will show me all the tags of that page. But! In my main page i'd like to show all tags, from all pages WITH a counter. For example if I tagged 4 pages with
I have this to select a date from a mysql db, and compare it to an array of month-names in swedish language. $monthnames = array("","Januari","Februari","Mars","April","Maj","Juni",&quo
I have a table like this: .--------------------------------. | Name | XX | Date | .--------------------------------. | N1 | 5 | 2009-05-01 | | N1 | 10 | 2008-01-08 | | N2 | 8 | 2009-02-02 | .________________________________. My result should be this:
I've written a rails app that's been running fine for a while without a database. Now, I'm dropping the registration database into the mix. It's not working in production. Everything works fine, of course, on my Mac. Here's the production environment