Tagged Questions
MySQL is an open-source, relational database management system.
0
votes
0answers
4 views
Getting a specific cell from specific row and column out of MySQL database, jdbc, java
I'm trying to get a specifc customer id out of a MySQL table from a telephone number input from the user to use it to add a new order to that customer id. I'm trying to use a method that creates a ...
-2
votes
0answers
13 views
MYSQL query not returning the updated result
I am getting the user's balance from mysql table on the page load, and its returning the result as required. After the page load, i am calling an AJAX call to update the user's balance and at the same ...
0
votes
0answers
7 views
Package migrations not working (no errors)
So, I have created a new package that sites in vendor/vendorname/package
I have added the new package to my app/config/app.php file's provider array:
...
0
votes
0answers
11 views
echo error if $_SERVER[“REMOTE_ADDR”] exists in mysql
I have a form that will be restricted to one submission per ip.
I'm getting it not to post duplicates but cant seem to get my echo messages displaying correctly.
$link = mysql_connect('localhost', ...
-1
votes
0answers
21 views
how can I print the host name, username and password of mysql in php file
I am using the command select CURRENT_USER(); for this but it is not working so anyone can suggest me what i have to do for this
0
votes
0answers
2 views
Download MySql Backup/Snapshot from Amazon RDS
I have hosted my MySql Database on Amazon RDS on my Production Instance. I have another RDS instance for Development purpose. Now I am looking for best/fastest way to restore database backup/snapshot ...
-7
votes
0answers
18 views
php search in mysql [on hold]
Any idea how will it able to search a word in mysql using php.
in mysql table
id | name
1 | this.is.the.word
2 | this is the word
where in php you search the this is the word. the result ...
0
votes
2answers
27 views
Count how many times a MySQL row viewed
I have search a lot but i couldn't find any solution.
I have a table with some rows, i want that when a visitor click on one of the rows in the test page then it should be count in the MySQL table ...
-1
votes
0answers
5 views
ERD Diagram to Follow any person ( Like Facebook / Twitter )
I am working on my project. I want to make people following each other. Guide me how to make erd
0
votes
2answers
19 views
How to query the data in this case in MYSQL /SQL?
I am working on online shop project. There are two kinds or order, and for each type of order, they have the same status, the table structure is like this
order_type_1
==============
id
order_type_2
...
1
vote
2answers
10 views
Selecting Multiple Counts from the database
I have a User model and a Workplace model.
User has a field gender(m/f) and each workplace has many users.
I want to select the count of total number of users in a workplace and also the count of ...
0
votes
0answers
7 views
Mysql Warning Code 1592 - When performing UPDATE to replicated mysql instance
[There are similar question on SO - but none that applies to this scenario]
I issue this statement:
update a
join b on a.fk = b.id
and b.f1 = 1
and b.f2 = 1
set a.f = 1;
And get this error:
...
0
votes
0answers
18 views
Query mysql table for value taken from typeahead input box
I am using typeahead 0.9.3 for an autocomplete text box using a remote data source with mysql querying. For the input selected by the user, I need the value from another column of the same table of ...
-5
votes
3answers
38 views
mysql_query is updating a data successfully but returning false
my sql query is successfully executed but returning false. Here is my query,
Code
include "connect.php";
$query = "update data_main set check_activation = 'validated' where username= \"$username\" ...
0
votes
2answers
19 views
Cannot delete DB. Drop DB query not working
I cannot delete database from raw MySql query here. Is there a better way? Please suggest. Is there a way to write a query to drop database in Zend. I'm using Zend 1.11
// Delete db function
public ...
-1
votes
0answers
9 views
Can the Facebook login app work nicely alongside any simply php login script? And how would code query work?
I am building a site using the simple PHP MySQL Login Script, and now I'm thinking I should allow the Facebook login option. But do I need a more complex login program to work alongside the FB login ...
0
votes
0answers
10 views
Installation and running mysql 5.6 in Ubuntu 14.04
I need to setup mysql5.6 server in ubuntu 14.04(32 bit). I downloaded mysql-server_5.6.19-1ubuntu14.04_i386.deb-bundle.tar from official site. I installed mysql using below commands:
dpkg -i ...
-3
votes
4answers
28 views
mysql WHERE clause a variable which holds multiple values - is not working
I have fetched a column values in a variable from table1 and trying to use that variable to fetching another column values from table2 with WHERE clause.
I'm trying the below code, where $theseOpCode ...
0
votes
0answers
18 views
PHP the MYSQLI_FETCH_ASSOC governed by a WHILE loop isn't going the full length of the associated query
I hope the title of this question wasn't cryptic lol. I had no idea how to explain the problem, but here it goes.
while ($comment_row = mysqli_fetch_assoc($comments)){
echo ($comment_count);
. ...
0
votes
1answer
17 views
How to Delete a Record in php that has composite (multi-column) primary key
Ok here is the php code for deletion
<?php
require '../../AppData/database.php'; $id = 0;
if ( !empty($_GET['ActNo'])) {
$id = $_REQUEST['ActNo'];
}
$sec = 0;
if ( !empty($_GET['SectionNo'])) {
...
0
votes
0answers
5 views
Will a newly added index to a table with a large number of rows have an immediate effect on queries?
I recently added some non unique indexes to two tables. Theses tables have number of rows in the millions, and 100mbs in size (including the size of indexes). After adding the new INDEX type index ...
0
votes
1answer
10 views
Trigger that Inserts to another table when new record added
I have 2 tables. The Data of profit table will come from the bet table. Therefore, automating INSERT to profit table whenever new record got added on bet table will be convenient.
How can I make sure ...
0
votes
0answers
16 views
How to insert data with blank record in the database using shell script?
116,1,29084918,,,6
I have the records above (comma delimited). I need to load it to database using shell script (.ctl). Is it possible to load the blank record (4th and 5th field above) in the ...
0
votes
0answers
14 views
Creating multiple csv when number of rows exceeds 1048576
I am reading data from MySQL and writing to a file using the CSV format, but due to large volume of data (rows exceed 1048576 ) I am getting a fatal error and am unable to display the data. Is it ...
0
votes
1answer
20 views
How to hide an alias column in mysql
I know this is a replica of some question asked already, but i need some suggestion.
I know basics of MySQL, i have a query to calculate distance between latitude and longitude and based on minimum ...
0
votes
0answers
7 views
Netbeans 8 support php mysql commands
I have question about using mysql commands of php in netbeans 8. It is quite weird, but at work laptop i can type mys... and code complete suggests me commands like mysql_connect, or mysql_select_db ...
0
votes
1answer
17 views
Server Error '/demo' in Application
The error is shown as below:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that ...
0
votes
1answer
15 views
retrieve parent child records in one query
I have a similar data set table called ‘album’
album_id parent_id name
2 NULL ...
34 NULL ...
35 2 ...
36 2 ...
In php, my url ...
0
votes
0answers
8 views
cannot start mysql / phpmyadmin in xampp 3.2.1
I tried to install xampp 3.2.1 but when I tried to start mysql, i got this
2014-06-25 11:26:35 1740 [Note] Plugin 'FEDERATED' is disabled.
2014-06-25 11:26:35 1a30 InnoDB: Warning: Using ...
0
votes
0answers
7 views
Query database in tpl file for CSCart add on?
I have created an add on for cscart.
The template file tpl needs to show data from a table in the cscart database.
How/where would I query the mysql database?
I have read that it is bad practice to ...
0
votes
1answer
10 views
Foreign key reference in spring mysql hibernate
Hi i am writing a spring mvc hibernate annotation application there i have 2 tables "team" and another table "players".Here i am using one-to-one mapping and mysql database.In players table i am ...
0
votes
1answer
14 views
MySQL Replace multiple from_str to reduce nesting
Is there a way to reduce nesting on a multiple replace? something like ('\'', '(', ')') on the from_str code like
SET NEW.uri = REPLACE(REPLACE(lower(NEW.event), ' ', '-') ,('\'', '(',')'), '')
I ...
1
vote
0answers
35 views
mysql performance, 300k rows, slow with index
A table stores stock price data. Table d201405 stores all data in May 2014. Table includes symbol, day, price, volume. Indexed on (symbol, day). Around 300K rows in a table.
Simple select is slow. ...
0
votes
1answer
17 views
Sum multiple table columns using php
I have two identical columns in multiple tables in same database. I want to combine the sum of each column in each table independently and display the results using php. Database name and tables:
...
-2
votes
2answers
35 views
Im not getting any returned value from this… why?
Yes it connects to the database, everything else works fine. I cant seem to pull the pass from the db its showing no returned echo
<?php
$username="test";
include("db.php");
...
0
votes
2answers
37 views
Printing the logged in username in PHP. “Hi, $username, welcome back!”
this question may seem simple but I have been stuck on it for 3 hours.
Scenario:
An end-user logs into my website.
Question:
How can I print his credentials and store it as a variable?
I have been ...
0
votes
2answers
35 views
Update database every hour without cronjob
Alright, So users in my game have an hourly income. Each hour I have a cronjob run to check and see if it's time for them to be payed. It works and all, But I want to stop using cronjobs as much. ...
-1
votes
0answers
16 views
Security analysis of input validation and sanitization
Considering that I have no colleagues who know anything about programming to analyze my code, I feel I need to post this question here.
I wrote some code regarding for user registration and used all ...
0
votes
2answers
13 views
MySQL Conditional Ordering
Is it possible to sort this way?
Unsorted
TIMEIN TIMEOUT
null 6/19/2014 12:00:00
6/19/2014 08:30:00 6/19/2014 10:30:00
6/19/2014 13:00:00 null
6/19/2014 ...
-2
votes
3answers
31 views
How to save in session?
How can i save a session in php so that when i click value in td tag it will save a session and redirect into another page?
this is my code:
<?
$sql = "SELECT * from members";
$result = ...
1
vote
1answer
18 views
how to store phonetics in mysql database
I have to store the phonetics of words in a database in this format:
blow = \ˈblō\
But when I see in the database, it's stored like this:
blow = \?bl?\
There are ? instead of symbols you can ...
-1
votes
0answers
23 views
PHP 'OR' operator not working on 'elseif' [on hold]
So I have somthing for changing Name and bio of a user database in PHP. When I try this code:
}elseif($getimage->nombre == $_POST['nombre'] OR $getimage->bio == $_POST['bio']){
$errores = ...
0
votes
0answers
7 views
How to change MySQL characterset on Mac?
My MySQL version is "Ver 14.14 Distrib 5.6.19, for osx10.7 (x86_64)"
I am trying to set "Server characterset" and "DB characterset" from latin1 to utf8.
I googled it, but I cannot find [client] in the ...
0
votes
2answers
25 views
MySql - select a record from 18446744073709551615 records
my question is simple: let's say that I have hypothetically 18446744073709551615 records in one table (the max number) but I want to select from those records only one something like this:
SELECT * ...
0
votes
1answer
18 views
show per column the value of each date_sub
I want to display the sales per month of the itemcode in one query. But the only thing I can do right now is get the total of it. Im using date_sub.
select p.itemcode, sa.quantity
from sales sa join ...
-2
votes
0answers
22 views
Licensing a web based application [on hold]
I've been working on a IT "Helpdesk" application for a few years now. My plans are to "license" (not sure on correct terminology) the application to nearby businesses and school districts.
I know how ...
1
vote
1answer
10 views
How to refer a value to another column in another table using PHPMyAdmin
I am using PHPMyAdmin.
i have two tables. SoundValues and Measurements.
I used an SQL statement on the table Soundvales to calculate an average value of its columns, but I want that value to show in ...
-1
votes
1answer
23 views
how to concat in mysql server
Having trouble concat this code in mysql server any ideas?
DECLARE @letters TABLE(letter VARCHAR(3))
INSERT INTO @letters
...
0
votes
1answer
38 views
Is this complex query possible in MySQL or do I need PHP?
I'm planning a db-driven website that matches users based on how they answer questions. I'm thinking the best approach is to run the match calculations in the SELECT query, but I have no idea how to ...
0
votes
1answer
9 views
Before insert trigger behavior in mysql
I created a table with some data in it, and a trigger like this:
DROP TRIGGER IF EXISTS verifica_cpf;
DELIMITER //
CREATE TRIGGER verifica_cpf
BEFORE INSERT ON `usuario` FOR EACH ROW
BEGIN
...