Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Vivek Deodhar
  Where is Vivek Deodhar?
 SANGLI
 India
 Vivek Deodhar
 To: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 Tags
Subject: RE: mysql query error
Thread ID: 393696 Message ID: 393703 # Views: 41 # Ratings: 1
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Sunday, December 22, 2013 9:15:39 AM         
   


> > hello experts
> >
> > not showing all records staring from namevar = "K"
> >
> >
> > lSearch = "Select * from Student Where name= ?namevar"
> >
> > it's not showing records, my table have 10 records starting from alphabet 'K'
> >
> > what i am missing
> >
> > thanks in advance
> >
> > edited

> >
> > OK GOT IT in mysql but how to use in vfp
> >
> > SELECT * FROM `atharva_data`.`student` where Ssname LIKE '%K%' ;
> >
> > is' there any other way
>
> Why would you want to use any other way? that's how it is done normally in sql-db of any type
> In vfp we are probably more used to check value of substr(fieldname,1,1) or "var"$fieldname which you could find its equivalence for sql-query but let's live an UNCOMPLICATED life, it's cheapest
>
> .

Hello,

if you want to get names STARTING FROM K, use where Ssname LIKE 'K%' (omit starting %) because this will allow mysql to use any available index on field Ssname.

Vivek

Live wisely... because in real world, there is no Ctrl + Z!

ENTIRE THREAD

mysql query error Posted by prasanna kunder @ 12/22/2013 2:18:17 AM
RE: mysql query error Posted by David Mustakim @ 12/22/2013 3:05:14 AM
RE: mysql query error Posted by Vivek Deodhar @ 12/22/2013 9:15:39 AM
RE: mysql query error Posted by prasanna kunder @ 12/23/2013 7:35:38 PM
RE: mysql query error Posted by Anders Altberg @ 12/22/2013 11:55:46 AM
RE: mysql query error Posted by prasanna kunder @ 12/23/2013 7:34:45 PM