Hello Everyone!
I am importing a 2.5gb csv file to a mysql table. My storage engine is innodb. Here is the script:
use xxx;
DROP TABLE IF EXISTS `xxx`.`xxx`;
CREATE TABLE `xxx`.`xxx` (
`xxx_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(128) NOT NULL,
`yy` varchar(128) NOT NULL,
`yyy` varchar(64) NOT NULL,
`yyy...
Hi,
I inserted a number of rows 3 hours ago and I don't want these rows from changing. How can I write sql statement that compare current time with the timstamp in the row and restrict users from changing it if abouve creteria is met.
Thanks
...
Using an addon of FPDF, I am printing labels using PHP/MySQL (http://www.fpdf.de/downloads/addons/29/). I'd like to be able to have the user select how many labels to print. For example, if the query puts out 10 records and the user wants to print 3 labels for each record, it prints them all in one set. 1,1,1,2,2,2,3,3,3...etc. Any i...
I'm trying to build an active page menu with PHP and MySQL and am having a difficult time fixing the error. In the while statement I have an if statement that is giving me fits. Basically I think I'm saying that "thispage" is equal to the "title" based on pageID and as the menu is looped through if "thispage" is equal to "title" then e...
I'm working on getting my database to talk to my Java programs. What do I need to get started?
Having already read through (and been thoroughly confused, something that does not happen often) with some other turorials I figured I'd best ask here. How do I import a jar file from the local directory? Can someone give me a quick and dirty ...
I'm sure everyone knows the joys of concurrency when it comes to threading.
Imagine the following scenario on every page-load on a noobily set up MySQL db:
UPDATE stats SET visits = (visits+1)
If a thousand users load the page at same time, will the count screw up? is this that table locking/row locking crap? Which one mysql use.
...
I didn't feel this rule before, but it seems that a binary tree or any tree (each node can have many children but children cannot point back to any parent), then this data structure can be represented as 1 table in a database, with each row having an ID for itself and a parentID that points back to the parent node.
That is in fact the...
Hi,
I'm just playing around with a dataset of my region generated by JOSM. I moved it into a mySQL DB with the 0.6 API scheme using Osmosis and now I'm desperately trying the following:
I want to get all streets of a city.
AFAIK there is no tag/relation in the OSM data to determine this so I tried it using a proximity search to get al...
How can I insert all dates in an year(or more) in a table using sql
My dates table has following structure
dates(date1 date);
Suppose I want to insert dates between "2009-01-01" to "2010-12-31" inclusive.
Is there any sql query for the above?
...
Hi There,
I just moved my website to a new server (Shared to VPS)
I expected errors, and the only error that is really puzzling me is this SQL statement.
echo mysql_query("SELECT COUNT(*) FROM users_online_now")
This returns nothing! And if I try the mysql_num_rows, it returns
mysql_num_rows(): supplied argument is not a valid MyS...
Hello,
I would like to make a server for a chat and I wonder whether a server must, for example,
connect to MySQL whenever a client enter to a room to check if he is moderator or banned from this room.
Is it necessary that I use MySQL to update the number of connected clients whenever a client go to another room(to display the number of ...
I want insert query statement in DB for LOG.
Is there a way that i can read from mysql binarylog file with php code and insert query statement in DB?
...
here my code -
if($pin == '105') {
$sqltree = "INSERT INTO tbltree (`userId`, `level`, `superId`, `rootId`, `childcount`)
VALUES ('$child1', '1', '$newid', '$myroot', '0');";
mysql_query($sqltree);
update_level($newid);
}
function update_level()
{
//for 1st level
$newid = $_S...
This question is about Mysql Binary logging.We need to move the Binary logging to a different hard disk . What is the configuration change required in Mysql?.Currently Binary logs go into the same folder as the ibdata and there is a replication slave running which needs the binary logs
...
i need to show the number of online visitors, but there is a problem with selecting algoritm to do it!
maybe i must create a table in DB, where i'll store ip addresses of visitors and time of visit! by so i can show the count of ip addresses, which's time >= NOW() - 10 minutes, for example...("now()-10 minutes" is just to show the logic,...
Hi everybody,
I have the following query in my application. It works well, but I need it to also contain the number of products that are associated with each manufacturer.
The current query:
SELECT * FROM (`manufacturers`)
JOIN `languages` ON `manufacturers`.`lang` = `languages`.`id`
ORDER BY `languages`.`id` asc, `id` asc
My prod...
hello friends,
I have a very big table (nearly 2,000,000 records) that got split to 2 smaller tables. one table contains only records from last week and the other contains all the rest (which is a lot...)
now i got some Stored Procedures / Functions that used to query the big table before it got split.
i still need them to query the u...
I read an article around schema-less database which sounds cool. (http://bret.appspot.com/entry/how-friendfeed-uses-mysql)
But what isn't clear to me is how do they run search queries on this data? Since the data is in JSON format how do we look for it?
...
As I understand it, OData is just a standardized way to expose relational data RESTfully. If I've got a PHP application, it should be able to process those RESTful requests and manipulate a MySQL database based on the request data and then return an ATOM feed. First, are the preceeding statements correct? Second, does a PHP library to...
$query1 = "select *
from linkat_link
where emailuser = '$email2'
or linkname ='$domain_name2'
ORDER BY date desc
LIMIT $From,$PageNO";
id catid discription price
------------------------------------
1 1 domain name 100
2 ...