+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| pid | varchar(99) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
1 row in set (0.00 sec)
+-------+---------------+------+-----+...
I am lost in MySQL documentation. I have a table with votes - it has these columns
id
song_id
user_id
created
I cannot find the query which will process the information and output the 10 most voted songs in a given time period. What is it?
...
Hello, guys!
I have a problem and I dont know what is better solution.
Okay, I have 2 tables: posts(id, title), posts_tags(post_id, tag_id).
I have next task: must select posts with tags ids for example 4, 10 and 11.
Not exactly, post could have any other tags at the same time.
So, how I could do it more optimized? Creating temporary tab...
So i have a SQL table setup as such
CREATE TABLE IF NOT EXISTS `points` (
`id` int(11) NOT NULL auto_increment,
`lat` float(10,6) NOT NULL,
`lng` float(10,6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
And im inserting stuff like
INSERT INTO `points` (`lat`, `lng`) VALUES ('89.123456','-12.123456');
Gives me a row with l...
How can I connect a Crystal Report (VS 2008 basic) to a MySQL DB without using a DSN or a preload DataSet using C#?
I need install the program on several places, so I must change the connection parameters. I don't want to create a DSN on every place, nor do I want to preload a DataSet and pass it to the report engine. I use nhibernate t...
Hi, im just need the easiest way in php to navigate in this result:
$datos = mysql_query("SELECT * FROM
usuarios LIMIT 0, 30 ");
I mean, how do i do an echo from $datos in each element of the table?
Ex.
Table:
ID Name LastName
1 Domingo Sarmiento
2 Juan Lopez
How can i read for example the second last name?
...
Hello all!
I have a php script that i use to send mail to customers. How can i execute this script every 5 days for example? Can anyone give me an idea or some links?
Thanks
...
Hi, i have this code:
$datos = mysql_query("SELECT * FROM `usuarios` LIMIT 0, 30 ");
Who is a simple MySQL query in php, but i need the result organized by date and time. There is a field in my table who has this value (automatic inserted when the user sing up in my page). So the table is something like this:
Id Name DT
1 Dom...
I'm trying to select all fields in two separate tables as long as they're sharing a common ID.
//mysql query
$result = mysql_query("SELECT * FROM project, links
WHERE project.id = links.id and project.id = $clientID")
//displaying the link
if ($row['url'] != null){
echo "<div class='clientsection' id='links'>Links</div>";
ec...
I'm currently developing a program that will generate reports based upon lead data. My issue is that I'm running 3 queries for something that I would like to only have to run one query for. For instance, I want to gather data for leads generated in the past day
submission_date > (NOW() - INTERVAL 1 DAY)
and I would like to find out how...
Hi there.
I'm trying to install SugarCRM version 5.5.1. on a webhost.
Everything goes nice until the step when the installation begins.
The output is this one:
Creating Sugar configuration file
(config.php)
Creating Sugar application tables,
audit tables and relationship metadata
.............
And never moves on!
...
i wonder what data type i should use for storing 11.1234 in mysql?
varchar or int? they got some decimal data type?
thanks
...
I have created a linked table to a MySQL table in MS Access 2003. I used the the mysql-connector-odbc-5.1.6-win32 driver I found on the MySQL site. When I view the table I can only see 70 characters in a VARCHAR(255) field. Has anybody had any luck using MySQL from MS Access?
...
I have a connection class for MySQL that looks like this:
class MySQLConnect
{
private $connection;
private static $instances = 0;
function __construct()
{
if(MySQLConnect::$instances == 0)
{
//Connect to MySQL server
$this->connection = mysql_connect(MySQLConfig::HOST, MySQLConfi...
Which method do you suggest and why?
Creating a summary table and . . .
1) Updating the table as the action occurs in real time.
2) Running group by queries every 15 minutes to update the summary table.
3) Something else?
The data must be near real time, it can't wait an hour, a day, etc.
...
How can we pass an Array to a Stored Procedure in MySQL 5.1 so that I can use it like:
Select column1
FROM table
where column2 IN in_array
Thanks
...
CREATE TABLE project (
id INTEGER NOT NULL AUTO_INCREMENT,
created_at DATETIME NOT NULL,
name VARCHAR(75) NOT NULL,
description LONGTEXT NOT NULL,
is_active TINYINT NOT NULL DEFAULT '1',
PRIMARY KEY (id),
INDEX(name, created_at)
)
ENGINE = INNODB;
CREATE TABLE role (
id INTEGER NOT NULL,
name VARCHAR(...
I'm not sure if this possible. If not, let me know.
I have a PDO mysql that updates 3 fields.
$update = $mypdo->prepare("UPDATE tablename SET field1=:field1,
field2=:field2,
field3=:field3
WHE...
Hi Folks,
I have a tables in my database called "points" and "category". A user will input info into both a location input and a keyword input text box.
Then I want to find points in my table where the keyword matches either the "title" field in the points table, or the "category" but are within a certain distance from the user's loca...
Hello
I have about 8 check boxes that are being generated dynamically from my database.
This is the code in my controller
//Start Get Processes Query
$this->db->select('*');
$this->db->from('projects_processes');
$this->db->where('process_enabled', '1');
$data['getprocesses'] = $this->db->get();
//End Get Processes...