PHP - Moved: Php Alphabetical Problem!!
This topic has been moved to MySQL Help.
http://www.phpfreaks.com/forums/index.php?topic=356016.0 Similar TutorialsThis topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309973.0 I'm pulling a list from a DB and inserting it in a drop down menu. Each item on the list has a numerical id associated called marketid in the DB. It works, but it orders the list alphabetically. I need it to order by marketid which is the column name. What code do I need to add? Here is what I have now.... <option value="<?=$market['marketid']?>"><?=$market['name']?></option> Thanks in advance all!! Tony Hi all! I'm stuck in the midst of some code. In it I have an if function which operates based on whether a variable (a word) is the same as another variable. Here is my code: Code: [Select] <? $var1 = "chicago"; if($table_name === $var1){ $result = mysql_query("SELECT * FROM another_table WHERE username='$usernamee'"); while($row = mysql_fetch_array($result) ) { $var2 = $row['var2']; $var2_new = $var2 * 2; mysql_query("UPDATE another_table SET var2 = '$var2_new' WHERE username = '$usernamee'"); } } ?>I tried using =, == and ===, but did not get any of the results I expected. Could anyone advice me on the situation? Thanks in advance. Regards, Thauwa I have a string which is a list of user id's like "44/5/6/67/7/88/56/76/9/90/65/74/8/68". I explode this string and put them into an array, but now I have a problem of getting the users first names from the database by using the id's and putting them in alphabetical order. How can I do this? Thanks How do I present these documentaries like this:
0-9
10 Things You Need to Know About Sleep
20 Animals That Will Kill You
A
Ant Kingdom
Atkins Diet
B
Battle of the Brains
Body Talk
I don't even know where to start!
I'm not asking anyone to do this for me; I just need a push in the right direction.
Any help will be appreciated.
This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=348956.0 This topic has been moved to PHP Math Help. http://www.phpfreaks.com/forums/index.php?topic=350528.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=356234.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=306379.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=330967.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=328210.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=354677.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=330478.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=327275.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=333386.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=325896.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=313310.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=309715.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=357112.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=334294.0 |