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...
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...
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...
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...
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....
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...
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...
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...
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...