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?
I have read many strong views (both for and against) SPs or DS.
I am writing a query engine in C++ (mySQL backend for now, though I may decide to go with a C++ ORM). I cant decide whether to write a SP, or to dynamically creat the SQL and send the query to the db engine.#
Any tips on how to decide?
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.
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.)?
I am currently having issues with users (or bots, not sure) visiting non-existent links that have three periods in a sub-directory.
For example, if someone goes to:
http://www.example.com/.../test/index.cfm?
Then I receive the following error:
String index out of range: -1 null
The error occurred on line -1.
I have tested it with just 1 period and just 2 periods and it goes straight to a 404 error. Any link though that has 3 or more periods will cause this error.
My question is what can I do to stop this from happening? My thoughts are to send them to a 404 error page or redirect them. How could I do that?
I am running ColdFusion 8.0.1 on Microsoft-IIS/7.0.
Thanks!
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
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 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
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.)
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?
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
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
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?
I am retrieving values from the url with the GET method and then using a if statement to determine of they are there then query them against the database to only show those items that match them, i get an unknown error with your request. here is my code
$province = $_GET['province'];
$city = $_GET['city'];
if(isset($province) && isset($city) ) {
$results3 = mysql_query("SELECT *
FROM generalinfo
WHERE province = $province
AND city = $city ")
or die( "An unknown error occurred with your request");
} else {
$results3 = mysql_query("SELECT * FROM generalinfo");
} /*if statement ends*/
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
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 successfully installed JRI and rJava on Windows 7. I am now trying to get it to work on Ubuntu with 64bit OS. I can make rJava calls from within R but getting JRI to work is more difficult. I am running NetBeans 7.1.2 and I have followed various tricks in setting R_HOME and java.library.path to enable all the classes to be loaded. That is, I am past the error messages such as "jri library not found" and "R_HOME not set".
From my java code,I can see that R_HOME = /usr/lib64/R.
The error message I get now is
Fatal error: you must specify '--save', '--no-save' or '--vanilla'
This happens when Rengine is first called:
Rengine r = new Rengine(args,false,null);
This appears to be an error message from R; it seems to be expecting a command line argument. I haven't seen any posting with this error message. Any ideas? Thanks, Peter
I have some financial values stored as text in a mysql db. the significance of financial is that negative numbers are stored enclosed in paranthesis. is there a way to automatically get the numeric value associated with that text. (like '5' shoudl be retuned as 5 and '(5)' should be returned as -5)
I have a MySQL database from a Joomla MultiSite installation where it has a set of tables with different prefixes for each Joomla site. When I export the db via phpMyAdmin it creates a SQL file where the tables are created and populated in alphabetical order. The problem is that the tables for the slave sites have dependencies on the tables for the master site, but alphabetically their prefixes are ahead of the master site. So the export works fine but when I try importing I get error after error and have to manually move sections around in the SQL file to make sure that the dependent tables are created/populated first.
So, is it possible to export a db via phpMyAdmin with the tables in a specific order?
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
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?