Tagged Questions
MySQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). If your issue relates to MySQLi, use the MySQLi tag instead.
-10
votes
0answers
9 views
Do You Have To Take Bodybuilding Supplements?
Because that's where I feel I can do them much good and I can offer the most sensible advice I have many years practical experience with steroids that no GP has am furthermore I I'm a medical student ...
0
votes
0answers
6 views
Creating a single json object from sql results in php
I am working on web services for my current project. My problem is that when I am running a sql query it returns multiple columns for a single column change.So when I am using json_encode() on the ...
0
votes
0answers
2 views
The handshake failed due to an unexpected packet format
I am trying to use mysqlconnector to connect with SSL to my database. I get the error in the title.
my.cnf
[mysqld]
ssl
ssl-ca=/etc/mysql/ca.pem
ssl-cert=/etc/mysql/server-cert.pem
...
0
votes
0answers
8 views
result based on survey with unique result
i need to find a unique result from dynamic question with a unique result. I tried many methods but i cant get the expected result. i need to suggest a course based on 10 or dynamic QA. Is there any ...
-1
votes
0answers
15 views
Need to send email on database insert
This question might look similar to existing one's but is really different.
I have a scenario where I have to send emails to different users while inserting data into MySQL DB. The logical part has ...
0
votes
0answers
3 views
JBPM6 configure mysql in eclipse and maven
i need to configure mysql with jbpm 6 , in jbpm 6 maven project using eclipse plugin, (didn't use work bench and ant build.xml) used maven.
Thank You
kasun
0
votes
0answers
15 views
how to import file csv without using bulk insert query?
i have tried import file csv using bulk insert but it's failed, is there another way in query to import file csv without using bulk insert ?
so far this is my query but it use bulk insert :
bulk ...
1
vote
2answers
8 views
foreign key not recognised in laravel 4.2
According to Dayle Rees
All foreign key columns follow a similar naming convention. The singular form of the related model appended with _id.
Consider this migration:
class CreateTables extends ...
0
votes
0answers
4 views
Recieved an empty config.inc.php file upon downloading through filezilla
At present i am doing one android application(Client-Server type).
I deployed two instances namely
1.)Tomcat Stack - to run servlets
2.)Lamp Stack - to perform jdbc operations
yes,i know ..tomcat ...
-4
votes
0answers
7 views
Accounts Managment System 1 [on hold]
*Dear
Hope you are doing fine . Can you please guide me about Account Managment System Project for final year.
Thanks
Sunny*
-1
votes
1answer
24 views
PHP While Foreach of MySQL key
Search far and wide and couldn't find an answer so I thought it was time to post. I currently have a table of vendors. I would like to loop through each vendor using the 'skuid' value for each as it ...
0
votes
1answer
20 views
Need help moving a partial value from one column to another
I need help moving a partial value from one column to another. I can't seem to figure it out.
THis is the table I have now. I want to move charge 17 that is a part of the formula that makes abc and ...
1
vote
3answers
21 views
mysql inner join query with multiple boolean conditions
I have following two tables
Table 1: creatives
creative_id creative_name
1 xyz
2 pqr
3 abc
Table 2: term_relationships
...
-1
votes
2answers
31 views
PHP Select Count and Left Join where
Im not sure if it´s possible to combine SELECT COUNT + Left Join on this way but it would be very helpful for me.
This is my code whitout Left Join attempt:
$pp = mysql_result(mysql_query("SELECT ...
-3
votes
0answers
11 views
convert sql query to cakephp query
SELECT * FROM daily_call_reports WHERE datetime_in IN ( Select MAX(datetime_in)
from daily_call_reports GROUP BY emp_id ) AND date(datetime_in)=current_date
Thanks in advance
0
votes
1answer
29 views
How To generate id based on joining query result
I need to listing counting data and based "rate" values joining two tables .
Rate Table
id rate ratevale
-------------------------
1 N NA
2 D DH
3 ...
1
vote
0answers
20 views
PDO Memory Exhausted
This is common issue but I have no choice to code it like this just to get appropriate header and body in Excel file
here how it starts
When a request been made to print, I first began make a query ...
0
votes
0answers
19 views
JSP failing on insert: ORA-01745: invalid host/bind variable name
I'm trying to insert multiple rows into a database. I have written up until where the database is queried for the rows but I am getting an error
ORA-01745: invalid host/bind variable name.
Can ...
1
vote
0answers
16 views
PDO MSSQL error query on null
I am trying to select rows from my database table, and I am getting an error stating that
Fatal error: Call to a member function query() on null in..
Our connection to the database shows ...
0
votes
1answer
25 views
Nested SQL statement with AVG()
I have three tables I want to pull data from. One is a classes table that stores a list of classes offered including an id, time stamp, trainer id, start time, am/pm and the days a class is held. The ...
0
votes
1answer
15 views
query to retrieve correct properties in the range
I want to retrieve all the properties in the range 2200000(min_price) to 2700000(max_price)
The query should look like
SELECT *
FROM properties
WHERE ( ((raw_min >= '{$min_price}')
OR ...
1
vote
3answers
32 views
setting html <select> option to be the default value based on current time
I have made a basic punchclock webpage & MySQL database,
only problem is when people accidently clock in instead of out at end of day or vice versa it leaves alot of gaps.
I need some sort of ...
1
vote
0answers
13 views
MySQL Stored Procedure running slow
I have created the following stored proc in MySQL:
BEGIN
DECLARE temp_mold VARCHAR(30);
DECLARE temp_time DATETIME;
DECLARE temp_shot_ct INT;
DECLARE temp_shot_count INT;
DECLARE temp_shot_mold ...
0
votes
2answers
34 views
Unable to update column in MySQL using php
I am trying to update a column of my MySql database which is present in server. I am not getting what mistake am I doing in my query, column is not getting updated. Can any one please show some light ...
0
votes
0answers
11 views
Kohana 2.3.4 : MySQL query to JSON
I am managing a project in Kohana 2.3.4 where I need to create an API for my android backend. What I am doing is send a query on my model which returns $result.
$query = "select ...
0
votes
0answers
33 views
Php & MySQL : how to display friends posts
i am creating a newsfeed system these are my table:
friends: (id, first_friend, second_friend)
posts: (id, post_sender_id, content)
and this is what i am trying to reach.. first find all currently ...
1
vote
1answer
28 views
create a user list from database
I have 2 tables vendor and favvendor. i want a list of vendor in a particular order. there are 3 criteria for listing. First the list should be sorted acc to the staffpick (value of staffpick needs ...
0
votes
0answers
12 views
Procedure call function with table fields
How to call a function in a procedure with the table fields?
I've read the question How to call a stored procedure using table data, but it is different.
I have a function:
CREATE FUNCTION ...
0
votes
3answers
20 views
Passing a varying parameter to a method
I use the below method to get messages(I don't use SELECT * just wrote it like that for the question). Sometimes I need only 10 messages, and sometimes I need all the messages. What is the best way to ...
0
votes
0answers
5 views
Google Cloud SQL - LOAD DATA LOCAL INFILE
I am running a web server using a google cloud compute engine vm and I am trying to dump a cvs file into the database. I know LOAD DATA INFILE is not supported, however LOAD DATA LOCAL INFILE is. ...
0
votes
0answers
8 views
error when trying to decrypt using rsa phpseclib from mysql
I tried to do a test to encrypt and decrypt processes , for encryption successfully and the encryption is store into database . but when doing decrypt always failed and appeared
Notice : ...
1
vote
3answers
34 views
How to group duplicate records and then update all members except lowest id for each group?
I have a table like this:
| id | name | description | publish
1 B text 1
2 B text2 1
3 B3 text3 ...
0
votes
1answer
18 views
Nested query in Rails without using find_by_sql
My sql query is
SELECT MAX(sale_money)
FROM (
SELECT SUM(sale_money) sale_money
FROM sales
WHERE MONTH(created_at) = 5
GROUP BY user_id
) t
I write the subquery in Rails 4 code:
...
1
vote
2answers
23 views
Connecting to MYSQL with PHP failing (+Swift)
I am trying to connect to mysql database but for some reason, it cannot establish connection. What I am trying to accomplish is using Swift to send/receive data from an app and register user. This is ...
0
votes
0answers
10 views
Compare peformance bulkloader with load data infile MySQL
I build an C# application which need to insert 200k records into MySQL. I found bulkloader and load data infile, so my question about performance of them. Which way is faster, or they are the same?
...
-2
votes
0answers
6 views
In SugarCRM: How to change 'prod_stage' follow 'sales_stage'
In SugarCRM, I am trying to chang 'prod_stage' follow 'sales_stage'.
I have two tables:
Table: 'opportunities_tqt_products' with fields:id, deleted, date_modified, opportunity_id, product_id, ...
1
vote
0answers
20 views
C# MySQL Report DataTable Error in SELECT clause: Expression near 'END'
SELECT
CASE WHEN si.aliasQty > 0 THEN si.aliasQty ELSE si.realQty END AS QTY,
CASE WHEN si.aliasQty > 0 THEN si.aliasUnitID ELSE i.unit END AS UNIT
FROM
items i, salesitems si
...
-1
votes
3answers
37 views
How to get the last integer ID you query in MySQL [on hold]
I am trying to get the last ID input that I query in MySQL Database.
Note: The itemid is auto increment and of type integer.
In this example, I want to get the last item query, which is itemcode ...
0
votes
3answers
28 views
Users are able to access a protected page using the direct link. How do I create a redirect?
I have a website assignment for my class and I ran into some trouble. When users access a protected page using the direct link they're able to access it still. But if they were to login to the ...
0
votes
3answers
12 views
mysql query to get comment count on category via articles via comments
If the title isn't helping, I'll try to clarify.
I have the following:
Category Article Comment
-------- ----------- ----------
id id id
name category_id ...
1
vote
3answers
22 views
page will not die() if the person is banned php mysql
<?php
include('session.php');
?>
<?php
require_once('mysql_connect.php');
$query2 ="SELECT id, username, banned FROM login WHERE username ='$login_session'";
$result2 = mysql_query($query2) ...
2
votes
1answer
13 views
getting first day with STR_TO_DATE()
Given:
SELECT STR_TO_DATE("March 03-06, 2015", '%M %e-%e, %Y') as date1
Instead of:
2015-03-06
I'd like to get:
2015-03-03
0
votes
1answer
22 views
calling mysql procedure using codeigniter [Error: result consisted more than one row]
I have table status and status_stage . After insert in status table, I want to add it to the status_stage table. I have this procedure:
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE ...
0
votes
1answer
29 views
SQL Join across multiple tables and order by single column
I am trying to join multiple tables and order the data based on a common column that they share. Here is an example:
Table A
pk itemId text
1 10 ordered
1 5 make
1 ...
0
votes
0answers
30 views
PHP double for loop is too slow for one million calculations [on hold]
Double for loop is two slow for the following reasons.
I have two tables in MySQL, and each table has 1,300 records. Now, I want to compare each row in the respective tables.
This is not SQL join ...
1
vote
0answers
4 views
export function with netbeans from mysql to excel
so i need to make a function which will take all datas from a table in my mysql. i've found the query (and it's working), but the problem is how to do it in java?
public void Print() {
Database ...
0
votes
0answers
9 views
Google Custom Search Not Works in my PHP Website
Recently i have launched a website and its developed with PHP and MySql.
Now I would like to add Google Custom Search to my website. I have tried but nothing happen while click the search button.
...
-7
votes
2answers
34 views
can someone tell me what's wrong with this php script? [on hold]
<?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=test;charset=utf8', 'root', '');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
$base = ...
0
votes
0answers
7 views
Allowing heroku to open connections to secondary database
I am using the default postgres database provided by heroku as a primary database and also have a secondary database that needs to be queried.
When my app tries to establish a connection to the ...
0
votes
2answers
20 views
Pass checkbox values 1 if checked if not 0to PHP using AJAX
I would like to insert the "0" or "1" into mysql database by using php checkbox but values could not be stored into database !
i'trying to insert an array of checkbox like this :
1: selected
0: not ...