English 中文(简体)
大型数据库的数据摘要
原标题:Extract data from large database
  • 时间:2012-04-21 19:38:50
  •  标签:
  • php
  • mysql

我正试图从一个拥有大约170 000个数据流的数据库中查询电子邮件。 我有一套基本手工艺品,可操作,但只能显示头34 000人左右的数据。

我的最终目标是建立一个大型重复数据库。 我怎么办?

<?php
$query="SELECT * FROM guess ORDER BY id";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
?>

First

<?php
$b=30000;
while ($b < 60000) {
    $id = mysql_result($result,$b,"id");
    $email = mysql_result($result,$b,"Email");
?>

<?php echo $b;  ?>. <?php echo $email ?> <br />
<?php $nummer++;   $b++; } ?> 

second

通过使用上述手段,我将储存所有载有电子邮件的浏览器,存放在综合处理器阵列。

之后,将撰写一份将发现重复电子邮件的文字,并删除。 最后,在文本中用浏览器、复印件和过去版印刷该代码,并上载到我的剪辑。

问题回答

An idea which is probably not a good one but whatever... if you only read 34K data at once and you know the total amount of rows, using LIMIT in your query could be a solution.





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签