Questions tagged as 'mysql'

1
answer

Query number of MySQL returns

I'm trying to do a check in a database to check if there is a certain value, which should return me 0 or 1. In the query manually done within phpMyAdmin I get success with my query. SELECT COUNT(*) FROM users WHERE name = 'nome' AND...
asked by 03.01.2015 / 16:21
1
answer

Give preference to greater equality, mysql

I have a table with a column named X in it I enter comma-separated values, for example: 1,2,3,4,5 . I use this query to get a particular row. SELECT * FROM 'x' WHERE CONCAT(',',x,',') LIKE '%,1,2,%' I wanted to adapt...
asked by 03.01.2015 / 18:12
1
answer

Can not connect to MySQL server on 'IP (4)

I have two servers with different purposes, one being a webserver running apache and php 5.3, and the other is a MySQL database server. The first uses the database in the second 24 hours a day, 7 days a week . The problem is that we recently...
asked by 26.02.2015 / 21:50
1
answer

Ajax returns repeated content

And the following I have an ajax script that returns me an array with new data that exists in the database every 1 second, this is working the problem and it always repeats the content that is already present in the database . Script <sc...
asked by 25.02.2015 / 23:33
1
answer

Mysql - Reading data in a string

There is a Cost Center table called "cost" in it, it contains IDs (field "code") that you would like returned in a SELECT. The however is that the data needs to be compared to a comma-separated string, which are the values that I need to select....
asked by 25.02.2015 / 22:21
1
answer

Python - Convert mysql datatime

I'm trying to compare the current date with the last record date of my mysql database: sql2 = "SELECT created_at FROM tempaverage WHERE created_at IN (SELECT max(created_at) FROM tempaverage)" cursor.execute(sql2) current = strftime("%Y-%m...
asked by 04.03.2015 / 15:12
1
answer

MySQL - How to Enable Federated? [duplicate]

How can I enable federated in mysql on windows and how to use it?     
asked by 02.03.2015 / 16:54
1
answer

Shopping Cart with Grouping by Seller

I wanted to group the products by sellers into my shopping cart. Currently it displays a single list, without this separation. Example: Pedro and Maria announce on my website and each one has their products offered and when the customer cl...
asked by 02.03.2015 / 14:38
1
answer

How to compare the time interval of the post since it was published?

Good people, I have a table where I create the posts where each one is added and the date it was published, now I need to create a system for in the post to appear how long was published type facebook liked your help to know how best to do th...
asked by 28.02.2015 / 21:13
1
answer

PHP codes register but not login

I have 6 pages in PHP, two of which present me with problems: entry.php (where the database connection data is) client.php (this is the login page, html formatting only) login.php (file that checks and logs in) vip.php (this pa...
asked by 28.02.2015 / 19:47