[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying Only Entrys Starting with A


Aye, I got it to work. The way I had it to start with was wrong, and when I tried the new way that Siim graciously sent, I accidentally left an extra comma in at the end! *slaps forehead* Welp, got it working now.
Thnax!

Thnax,
~Åstro

Jason Nugent wrote:

> The query that was posted looks correct.  Perhaps fulltitle isn't the name of the column? If you're doing this in PHP, you might want to do the following, right after you call your mysql_query("....") command:
>
> echo mysql_error();
>
> so you can actually see what is going wrong.
>
> HTH,
>
> Jason
>
> Chadd Nervig wrote:
>
> > Tried it, and still the exact same thing happens.Though yes, that sounds like it's the right thing I want to happen.
> >
> > > If I got you right, then SELECT * FROM newalbums WHERE fulltitle like 'A%'
> > > ORDER BY fulltitle;
> > >
> > > S.Einfeldt
> > >
> > > > Hiay,
> > > >  I've got a semi-large table, and I want to display all the entrys where the column "fulltitle" begins with A (or any other letter). I can't figure out how to do it. I can display all entrys, alphabetically,
> > > > pretty easily, but when I add in the part to only look for ones starting with A, it returns an error. Can anyone tell me how to do this?
> > > >
> > > >  My current line of code is:
> > > > SELECT * REGEXP 'A%' FROM newalbums ORDER BY fulltitle ASC
> > > >
> > > >  It's being used in PHP, and the error returned is:
> > > > Warning: 0 is not a MySQL result index in <pageaddress> on line 120
> > > >
> > > > I'm guessing that what it's having problems with is that it doesn't know which column to check for starting with A% at. Any idea how to do this?
> > > >
> > > > Thnax,
> > > > ~Åstro the Space Duck
> > > >
> > >
> > > --
> > > ---------------------------------------------------------------------
> > > Please check "http://www.mysql.com/documentation/manual.php"; before
> > > posting. To request this thread, e-mail mysql-thread60890@xxxxxxxxxxxxxxx
> > >
> > > To unsubscribe, send a message to:
> > >     <mysql-unsubscribe-chadd=shippedfree.com@xxxxxxxxxxxxxxx>
> > >
> > > If you have a broken mail client that cannot send a message to
> > > the above address (Microsoft Outlook), you can use:
> > >     http://lists.mysql.com/php/unsubscribe.php
> >
> > --
> > ---------------------------------------------------------------------
> > Please check "http://www.mysql.com/documentation/manual.php"; before
> > posting. To request this thread, e-mail mysql-thread60892@xxxxxxxxxxxxxxx
> >
> > To unsubscribe, send a message to:
> >     <mysql-unsubscribe-jnugent=ns.sympatico.ca@xxxxxxxxxxxxxxx>
> >
> > If you have a broken mail client that cannot send a message to
> > the above address (Microsoft Outlook), you can use:
> >     http://lists.mysql.com/php/unsubscribe.php
>
> --
> --------------------------
> Jason Nugent, BSc(hon)
> Mal[MiC]Havoc
> Certified Webmaster
> MalHavoc@xxxxxxxxxxx
> --------------------------
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/documentation/manual.php"; before
> posting. To request this thread, e-mail mysql-thread60902@xxxxxxxxxxxxxxx
>
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-chadd=shippedfree.com@xxxxxxxxxxxxxxx>
>
> If you have a broken mail client that cannot send a message to
> the above address (Microsoft Outlook), you can use:
>     http://lists.mysql.com/php/unsubscribe.php


-- 
---------------------------------------------------------------------
Please check "http://www.mysql.com/documentation/manual.php"; before
posting. To request this thread, e-mail mysql-thread60904@xxxxxxxxxxxxxxx

To unsubscribe, send a message to:
    <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>

If you have a broken mail client that cannot send a message to
the above address (Microsoft Outlook), you can use:
    http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.