AV1611 Posted March 14, 2006 Share Posted March 14, 2006 this works fine, but not in the correct order[code]("Select * From bible where `$WhichBook` Like '$BOOK' and `chapter` like $CHAPTER")[/code]this HAS NO RETURNS![code]("Select * From bible where `$WhichBook` Like '$BOOK' and `chapter` like $CHAPTER" ORDER BY `key` ASC)[/code]here is the table structure:[code]CREATE TABLE `bible` ( `key` int(6) NOT NULL default '0', `book` varchar(255) default NULL, `chapter` varchar(255) default NULL, `verse` varchar(255) default NULL, `scripture` longtext, `spbook` varchar(255) default NULL, `spanish` longtext, `scripture2` longtext, PRIMARY KEY (`key`), UNIQUE KEY `MAIN` (`key`), UNIQUE KEY `SECOND` (`book`,`chapter`,`verse`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 1418240 kB; InnoDB free: 1415168 kB; InnoDB fre'[/code] Quote Link to comment Share on other sites More sharing options...
AndyB Posted March 14, 2006 Share Posted March 14, 2006 turn on error reporting and add ... or die("Error: ". mysql_error() ... what does that output? Quote Link to comment Share on other sites More sharing options...
redbullmarky Posted March 14, 2006 Share Posted March 14, 2006 you missed the closing " quote off the end of your query, as you put the ORDER BY outside of your original quote:[code]("Select * From bible where `$WhichBook` Like '$BOOK' and `chapter` like $CHAPTER ORDER BY `key` ASC");[/code] Quote Link to comment Share on other sites More sharing options...
AV1611 Posted March 14, 2006 Author Share Posted March 14, 2006 That would explain why mysql_error missed it....Thanks... That's what happens when you are tired...[!--quoteo(post=354850:date=Mar 14 2006, 07:16 AM:name=redbullmarky)--][div class=\'quotetop\']QUOTE(redbullmarky @ Mar 14 2006, 07:16 AM) [snapback]354850[/snapback][/div][div class=\'quotemain\'][!--quotec--]you missed the closing " quote off the end of your query, as you put the ORDER BY outside of your original quote:[code]("Select * From bible where `$WhichBook` Like '$BOOK' and `chapter` like $CHAPTER ORDER BY `key` ASC");[/code][/quote] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.