Member Avatar

Hi all I have an Access database Table and one of the columns has a date value the column name is closing. I would like to do an order by closing asc the null values are allways on top and I would like it to be at the bottom. I have googled for a solution and I came up with this Dim SelectQueryString As String = "SELECT * FROM " & Filter & " order by case when Closing is null then 1 else 0 end, Closing" When executing this query I get Unrecognized keyword WHEN error. thanks in advance

Member Avatar
+0 forum 2
Member Avatar

I have a LINQ function to get 3 things :: Line, Average of Duration and Count I have a problem to sort it based on Average Of Duration column. Here is my code: Dim group2 As IEnumerable(Of DataRow) = _ From row In Ds.Tables(0).AsEnumerable() _ Group row By LINENAME = row.Field(Of String)("LINENAME") Into grp = Group _ Order By (LINENAME >= Convert.ToString(LINENAME)) _ Select DTRow(grpTot, _ New Object() {LINENAME, _ New TimeSpan(CType( _ grp.Average(Function(r2 As DataRow) TimeSpan.Parse(r2.Field(Of String)("EVENTTM")).Ticks), _ Int64 _ ) _ ), _ grp.Count() _ } _ ) How can I sort my LINQ based on the Average, …

Member Avatar
+0 forum 12
Member Avatar

I have the following codes.. echo "<form><center><input type=submit name=subs value='Submit'></center></form>"; $val=$_POST['resulta']; //this is from a textarea name='resulta' if (isset($_POST['subs'])) //from submit name='subs' { $aa=mysql_query("select max(reservno) as 'maxr' from reservation") or die(mysql_error()); //select maximum reservno $bb=mysql_fetch_array($aa); $cc=$bb['maxr']; $lines = explode("\n", $val); foreach ($lines as $line) { mysql_query("insert into location_list (reservno, location) values ('$cc', '$line')") or die(mysql_error()); //insert value of textarea then save it separately in location_list if \n is found } If I input the following data on the textarea (assume that I have maximum reservno '00014' from reservation table), Davao - Cebu Cebu - Davao then submit it, I'll have …

Member Avatar
+0 forum 4
Member Avatar

Hi , I have an xml which is in the following format. <root> <x> <y> <uri>ssomeuri</uri> <date>2012-07-11T10:29:08+00:00</uri> </y> </x> <x> <y> <uri>ssomeuri2</uri> <date>2012-07-11T11:01:08+00:00</uri> </y> </x> </root> I wanted to get uris in the order of date. I am very new to xpath, can any body help me on this. the result should be like ssomeuri2 ssomeuri Regards Sri

Member Avatar
+0 forum 1
Member Avatar

Hi, I have a bit of a strange problem where I am unable to "echo" results from a database - I will show you the code then explaine what im trying to do [code] <?php include_once "connect_to_mysql.php"; $sql = mysql_query("SELECT * FROM table ORDER BY RAND(), LIMIT 1"); while($row = mysql_fetch_array($sql)){ $add = $row["add"]; $link = $row["link"]; $title = $row["title"]; echo " <b>$add</b> <a href='$add'$link</a> "; } ?> [/code] db has the following fields id, add, link, title The script to connect to the database works fine, as if i change the host, it gives me an error. But im …

Member Avatar
+0 forum 4

The End.