Questions tagged as 'mysql'

1
answer

Updating data in SQL

I have a table with the following fields: Nome(VARCHAR) , Email(VARCHAR) , Credito(INT) I wanted to know how, or with what command, to decrease or increase the Credito field. I know you have to use UPDATE b...
asked by 13.12.2014 / 21:10
1
answer

online users and past time on site

How can I get the amount of online users on my site (instantly) using only PHP MYSQL and JQUERY? and respectively get the time the user spent on my site     
asked by 26.12.2014 / 03:41
3
answers

How to optimize SQL queries containing DELETE related to SELECT?

$a = mysql_query("SELECT * FROM catalog_items where page_id='84'") or die(mysql_error()); while ($row = mysql_fetch_array($a)){ $base_item = $row['item_ids']; mysql_query("DELETE FROM items_rooms where base_item = '".$base_item."'") or...
asked by 24.03.2015 / 06:01
1
answer

How to save user-supplied date in MySQL?

I have a form that has a field where the user's date of birth is entered, this field has a datepicker that already returns the date in year, month, day format, this date is accessed through $_GET['birthdate'] its format is strin...
asked by 07.02.2015 / 13:51
2
answers

Mysql WorkBench Import and Export

I have a Bank in MySQL Workbench with the data filled in and I want to pass this all filled-in data to another MySQL Workbench, but on another computer. Is it possible to do this, or will I have to populate the data all over again?     
asked by 23.04.2014 / 19:19
2
answers

Select too slow, how to improve?

I have a cadre of craftsmen with about 90 thousand records. I created the SQL below to return me the total of artisans in each of the regions that they are registered. Although it works, it is slow, taking more than 30 seconds to return the reco...
asked by 22.09.2016 / 19:52
1
answer

What kind of data do you use to store URIs in the database?

What kind of data do you use to store URIs in the database, taking into account an undetermined or very large URI length?     
asked by 10.09.2016 / 03:00
1
answer

MYSQL calculate the percentage chosen

I'm doing a QUIZ and at some point I have to show the percentage of the alternatives chosen by the users. I have this table: ID RESPOSTA 1 a 2 a 3 b 4 b 5 c 6 a The answer I need to have from MYSQL would be the percentages of choice:...
asked by 15.08.2016 / 16:41
1
answer

Mark duplicate fields in a table

I have a table in my database and would like to mark occurrences where certain code repeats itself. Remember that this code field is not a primary key. Example: Data Código Repetição Status ... 25/2/2014 138863 ok...
asked by 12.03.2014 / 21:07
1
answer

Value of a query to a numeric field returns non-numeric

I am trying to read a field in a table that is of integer type. And it's also a primary key and auto-increment. The returned value is put in a label (already tried to put in an input text too). To read the target table and put the result i...
asked by 23.03.2014 / 15:11