Jump to content

[SOLVED] selecting numeric values


Recommended Posts

weird so tried doing it and i did different numbers then the example im getting data like:

96541-1

96542-1

96543-1

96544-1

96545-1

96546-1

96547-1

96548-1

96549

96565

96566

96567

96600

96602

96603-1

96604-1

96605-1

96607

96608

96694

 

any functions to clean that up in sql?

<?php

//23/12/2008

include("includes/config.php");

 

$sql = "SELECT part FROM products WHERE part >6999 AND part <8000 OR part >8999 AND part >10000";

$result = mysql_query($sql)or die(mysql_error());

while($row=mysql_fetch_array($result)){

echo $row['part']."<br>";

}

?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.