Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

129 users online



Mysql Query - Select Range...

Mysql Query - Select Range...

Currently viewing this thread: 1 (0 members and 1 guests)


lollipop

lollipop

Status: Offline!

Mysql Query - Select Range...

Greetings,

im trying to select a certain range from a mysql database.
For example:

PHP:

<?php

$result 
mysql_query("SELECT * FROM $table WHERE name='$name' AND age BETWEEN 17 and 21") or die (mysql_error());

?>

gives me an error when i try to use that. Any help is appreciated.

Thanks in advance,
H.t

darkobjects

darkobjects

Status: Offline!

can we see the error?

___________________


What was I talking about?

http://hosted.oxyscripts.com/sigs/sigs.php?id=13
-proud user of FIREBIRD

lollipop

lollipop

Status: Offline!

Hey,

the error doesnt really matter in this case, i just want to know if someone knows the correct syntax for this... once i have the correct syntax ill know what i need to do with it.

Thanks,
H.t

epyon

epyon

16, staying Asian.
Status: Offline!

the two and's is confusing it.
(AND age BETWEEN 17 and 21) should work.

___________________

http://whatpulse.bounceme.net/sig/epyon.png

lollipop

lollipop

Status: Offline!

Greetings,

Thanks Epyon, that works great.

Kind Regards,
H.t

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0075 seconds.