Re: [PHP-WIN] showing warnings

2007-09-12 Thread John Mertic
How about an EXPLAIN for the other query, namely: $sql = "SELECT Tune_Name,Tune_Type FROM Mobile_Tunes WHERE Tune_Name LIKE '".$tunename."%' AND Tune_Type = '".$tunetype."'"; I think that's the one that's an issue. You may also want to try rewriting it like this: $sql = "SELECT Tune_Name,Tune_Ty

Re: [PHP-WIN] showing warnings

2007-09-11 Thread Asim
Hi i am including table structure and other results to you CREATE TABLE Mobile_Tunes ( Tune_ID int(6) NOT NULL AUTO_INCREMENT, Tune_Name varchar(30) NOT NULL, Tune_Type varchar(10) NOT NULL, PRIMARY KEY (Tune_ID), UNIQUE KEY Tune_Name (Tune_Name), INDEX Tune_Type (Tune_Type) )ENGIN

[PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi this result is shown by mysql on running command prompt mysql> explain SELECT Tune_Name,Tune_Type FROM Mobile_Tunes; +--+--+---+--+-+--+--+---+ | table| type | possible_keys | key | key_len | ref | rows | Extra | +--

Re: [PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi i have added index on both columns but still same warning is issued by mysql then what i do now? BYE John Mertic <[EMAIL PROTECTED]> wrote: Is the table 'Mobile_Tunes' indexed at all? If not, you may want to consider adding one at least one 'Tune_Type

Re: [PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi i have added index on both columns but still same warning is issued by mysql then what i do now John Mertic <[EMAIL PROTECTED]> wrote: Is the table 'Mobile_Tunes' indexed at all? If not, you may want to consider adding one at least one 'Tune_Type' and another on 'Tune_Name'. Joh

Re: [PHP-WIN] showing warnings

2007-09-10 Thread John Mertic
Is the table 'Mobile_Tunes' indexed at all? If not, you may want to consider adding one at least one 'Tune_Type' and another on 'Tune_Name'. John On 9/10/07, Asim <[EMAIL PROTECTED]> wrote: > Hi > > script is following > > if(isset($_GET['SearchTune'])) > { > $tunename = substr($_GET['tune_name

Re: [PHP-WIN] showing warnings

2007-09-10 Thread Asim
Hi script is following if(isset($_GET['SearchTune'])) { $tunename = substr($_GET['tune_name'],0,3); $tunetype = $_GET['tune_type']; $sql = "SELECT Tune_Name,Tune_Type FROM Mobile_Tunes WHERE Tune_Name LIKE '".$tunename."%' AND Tune_Type = '".$tunetype."'"; } else { $sql = "SELE

Re: [PHP-WIN] showing warnings

2007-09-09 Thread John Mertic
Can you provide the script you are running and the exact error message you are getting? John On 9/9/07, Asim <[EMAIL PROTECTED]> wrote: > Hi > > > in my script when i scan whole table for result set to display in my page > it shows warning that suggest me to use > > > EXPLAIN statement but i

[PHP-WIN] showing warnings

2007-09-08 Thread Asim
Hi in my script when i scan whole table for result set to display in my page it shows warning that suggest me to use EXPLAIN statement but i donot need it as i have to show records on page how to avoid this warning? Bye Asim Jamil - 0092 3