Select question


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if this should be a stupid question!

But I'm a little surpized due to following..

I have a search script (very large mysql db) which is working pretty fast for searching!
I'm using following querry:
Code: $q="SELECT `url`,`caption`, `type`,`fsize`, MATCH (caption) AGAINST ('$kwd2') as score,`source`, `lastcheck`, `dateadded`, `desc`, `media`, `filename`, `sname`, `rating`, `stream`, `id` FROM `v2links` WHERE MATCH (caption) AGAINST ('$kwd2')$stype $fxtype $fxmedia $fsort LIMIT $start,$search_count";sample: http://www.filemirrors.info

Now I would like to display the 30 latest records using following querry:
Code: $q="SELECT `url`,`caption`, `type`, `id`,`fsize`,`source`, `lastcheck`, `dateadded`, `desc`, `media`, `filename`, `sname`, `rating`, `stream`, `id` FROM `v2links` Where checked=1 $stype $fxtype $fxmedia $fsort LIMIT 30";sample: http://www.filemirrors.info/latest.html

Now it seems to take much more time (3x) to display the last 30 records then when using the searchbox and enter a keyword...

I thought a simple select should be going faster then match against a keyword?
Is there an explenation for this or am I missing something?

Thanks

No comments posted yet

Your Answer:

Login to answer
275 Like 38 Dislike
Previous forums Next forums
Other forums

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Mes

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along

Need help making a script that moves data into acrhive table
Hi,

I'm kinda new to php/mysql

And i wrote a simple script to store sales lead for a b

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash