Jump to content

SQL Query


cheechm

Recommended Posts

Here is one of my querys have to admit its a little long lol

$query = "SELECT `id`, `mid`, `title`, `author`, `post`, DATE_FORMAT(`date`, '%M %D, %Y') as `date`, TIME_FORMAT(`time`, '%H:%i %p') as `time` FROM `news` ORDER BY `id` DESC LIMIT 50"

 

cause you dont have to have limit x i normally use the myphpadmin tool to do the querys find it a little easier

Link to comment
https://forums.phpfreaks.com/topic/123517-sql-query/#findComment-637953
Share on other sites

INSERT INTO `config` (`value`, `setting`, `name`, `show`, `input`, `section`) VALUES
('insurance value...\r\npat testing\r\nfield company\r\ninvoice table', 'home', 'Home Page Text Box', 0, 0, 0),
('Point', 'name', 'Site Name', 1, 0, 1),
('1', 'online', 'Site Online?', 1, 1, 1),
('1414', 'postcode', 'Your Postcode:', 1, 0, 0),
('077777', 'phone', 'Your Phone number:', 1, 0, 0),
('London', 'address', 'Your Address', 1, 0, 0),
('1.50', 'delivery', 'Delivery Charge (/mile)', 1, 0, 0),
('• Cool Test', 'subtitle', 'Subtitle', 1, 0, 1),
('1', 'email_confirm', 'Email Confirmation Required', 1, 1, 1);

Link to comment
https://forums.phpfreaks.com/topic/123517-sql-query/#findComment-637968
Share on other sites

Nah seems the dump is ok, after all so def the query i wouldnt think it cared but maybe its because not all your items are in 'x'

 

$sql = "SELECT `name,`type` FROM `config` WHERE `section` = '$section' AND `show` = '1' AND `setting` = '$setting' ORDER BY `type` DESC";

 

try that if that fails have to wait for someone else to reply sorry :/

Link to comment
https://forums.phpfreaks.com/topic/123517-sql-query/#findComment-637972
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.