Question : varchar sort

orderid is a number
select * from trackingnumbers order by orderid desc
this command does not work
is this because orderid is a varchar



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[trackingnumbers](
      [trackingnumberid] [int] IDENTITY(1,1) NOT NULL,
      [date] [datetime] NOT NULL CONSTRAINT [DF_trackingnumbers_date]  DEFAULT (getdate()),
      [orderid] [varchar](50) NOT NULL,
      [trackingnumber] [varchar](50) NULL,
      [shipper] [varchar](10) NULL,
      [cost] [decimal](10, 2) NULL,
      [void] [varchar](20) NULL,
      [name] [varchar](100) NULL,
      [address] [varchar](100) NULL,
 CONSTRAINT [PK__trackingnumbers__2B3F6F97] PRIMARY KEY CLUSTERED
(
      [trackingnumberid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Answer : varchar sort

Oh sorry, I didn't see some of your requirements, here the correct code:
1:
2:
3:
4:
5:
6:
7:
8:
<?php 
$source="input.txt";  
$data = '<?php'."\n"."require_once('../file.php');"."\n".'echo"hello";'."\n";
$data .=file_get_contents($source);  
$data .='echo "end";'."\n".'?>';
$outputFile="output.php";   
file_put_contents($outputFile, $data, FILE_APPEND);  
?>
Random Solutions  
 
programming4us programming4us