Hi
in mysql how to write a sql like this, to get the amount of X 20 and <20
select date, numberOfXMoreThan20,numberOfXLessThan20, otherValues
from table
group by (date, X20 and X<20)
thanks
hey, i want to format a date in mysql using
DATE_FORMAT(tblnews.datead, '%M %e, %Y, %l:%i%p')
i cant seem to get the quotes right , so i keep getting errors. how would you put this in a query?
following the answer here, altho it solved my problem, it displays a blank table. .something like this. the data does get inserted in the mysql but the table displays nothing.
the codes are posted on the above link.
your help would be appreciated. thanks!
$extension = “SUBSTRING_INDEX(domain_name, ‘.’, -1)”;
$this->db->order_by($extension, “asc”);
It says:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘asc LIMIT 50’ at line 44
But its working when I didn’t used the $this-db-order_by Active Record Class
such as this one:
$this-db-query(“SELECT * FROM domain ORDER BY SUBSTRING_INDEX(domain_name, ‘.’, -1)”);
Anyone please help me. Thanks.
I'm working in NetBeans 6.8 and I'm trying to create new connection using MySQL to an existing database. Does the .mdb file need to be in a specific location? It tells me that it cannot establish the connection.
I am currently working with User objects -- each of which have many Goal objects. The Goal objects are not User specific, that is, Users can share the same Goal. I am attempting to fashion a way to calculate a "similarity percentage" between two Users... (i.e., taking into account how many Goals they share as well as how many Goals they do not share) Does anyone have experience with this type of situation? I am using Grails with Mysql if that is helpful.
Thanks
Hello,
I my software I need the client to install a database server (MySQL in my case). I'm deploying the setup and making user install it like a pre-requisite.
After installing the DBMS server. I need to setup databases (that I created) on the client machine. How to do this automatically (as part of installation.)?
Hi, I have a mysql table that I need to only contain 20 newest records before adding additional records.
New rows are added daily so I would like it first delete any records that are greater than the 20 allowed starting with the earliest.
The table contains an auto increment "id" column so I can easily determine which is the earliest records.
Thanks for any help.
I have a email address like [email protected] and [email protected][email protected] ... etc
I want a Mysql select query so that it would trim user names and .com an returns output as
gmail,ymail,hotmail etc
I have test_scores table with following fields:
Table schema:
id (number)
score1 (number)
score2 (number)
score3 (number)
score4 (number)
Sample data:
id score1 score2 score3 score4
1 10 05 30 50
2 05 15 10 00
3 25 10 05 15
Expected result set:
id col_name col_value
1 score4 50
2 score2 15
3 score1 25
What is a good SQL for this?(I am using MySQL.)
My server is currently based on us eastern time, and as I am in the UK, i need to move this forward 6 hours.
When using now() in mysql, i am getting the wrong time, is there anything i can add to now() to bring it forward 6 hours?
Thanks
Right now on my (beta) site i have a table called user data which stores name, hash(password), ipaddr, sessionkey, email and message number. Now i would like the user to have a profile description, signature, location (optional) and maybe other things. Should i have this in a separate mysql table? or should i share the table? and why?
It seems that if you have many tables, you can only perform a MySQLDump without locking them all, otherwise you can an error.
What are the side effects of performing a MySQLDump without locking all the tables; Is the DB snapshot I get this way, consistent? Do I have any other alternative for getting a backup of a MySQL DB with many tables?
Is it possible to install PHP, MySQL, Apache individually on Solaris instead of installing them through a webstack? What are the advantages and disadvantages?
I seem to frequently get a CURL error on Solaris when dealing with HTTPS sites. (error:81072080:lib(129):func(114):reason(128). I have no clue why that error is occuring and thought it might solve it, if I upgrade to latest PHP,MySQL,Apache versions. At this point I am not even sure if it's a Solaris issue.
Any advice?
Thanks
Hi guys,
I have a database that a time filed that is stored in this format "2010.06.04. | 18:53 01".
What I need is to select rows that have a specific date, for example "2010.06.04."
Right now I am doing it my first selecting all rows and then looping through them and adding ones with the specified date to a new array.
Maybe there is an easier way to do it and I somehow can select it using mysqli_query?
Thanks!
Ok, so title says it all. Of course, I store all players' ip addresses in mysql and I can check if there is a person with the same ip address before he registers, but then, he can register to my page at school or wherever he wants. So, any suggestions?
Following is the command to fetch maximum salary form empsalary table in mysql
select max(salary) from empsalary;
but I want to fetch employee who got fourth highest from the list of employee.
I don't want to use trigger or function because I know there is direct command to fetch.
Why is it that you need to place columns you create yourself (for example "select 1 as number") after HAVING and not WHERE in MySQL?
And are there any downsides instead of doing "WHERE 1" (writing the whole definition instead of a column name)
I have a jQueryUI slider on my website that deals with price range.
I have a products table in mysql that has various entries.
I am using the slider to filter the results, but I need to set the minimum and maximum prices from the records in my database.
Should I just generate (with php) hidden fields in my html that contain the minimum and maximum and then use jQuery to obtain them? Or is there a better way of achieving this, maybe using AJAX?
Thanks
Hi.
I'm about to develop a small web gallery, where it's supposed to be possible to upload several pictures at a time and then add some info abut the pictures.So I need a free java or flash local file browser that can pass me some info of the pictures that gets uploaded so that I can create some SQL entries for each picture.
The platform for the project will be PHP and MySQL.
Any good recommendations?
I would to be a PHP/Mysql Programmer
what is the technologies that i must know ?
Like :-
Frameworks
IDEs
Template Engines
Ajax and Css Frameworks
please tell me the minimum requirements that i must know , and tell me your favourite things in the previous list ?
thanks
Hello my Dear friends!
Firstly sorry to my English I am not an expert:)
I am using freeradius 2.1.7 and MySQL instaled on Ubuntu server 9.04.
Now, the perl script called: "auth.pl" is verifying usersnames, passwords, and updating information.
The problem is that on a certain number of connections simply "NAS" - Mikrotik
until the next reboot users can not connect.
If you need i cann show you auth.pl script