ÎÒÏÖÔÚÓÐÁ½¸ö±í
µÚÒ»¸ö±íΪ
id title content
1 34234 234234
µÚ¶þ¸ö±íΪ
id Tcontent time tab1ID
1 ¼ÎÁê½ 2009-1-1 1
ÔõÑù°Ñ±í¶þµÄtime¼ÓÈë±íÒ» È»ºóselectÅųötimeµÄÉýÐò
ÎÒÁ¬½ÓÁ½±í¶¼¸ãÔÎÁË Çë´ó´óÃǰï°ïæ
SQL code:
select *
from µÚÒ»¸ö±í a ,µÚ¶þ¸ö±í b
where a.id=b.tab1ID
order by b.time
SQL code:
select *
from µÚÒ»¸ö±í a inner join µÚ¶þ¸ö±í b on a.id=b.tab1ID
order by b.time
select *
from A1 a inner join A2 b on a.id=b.tab1ID
order by b.time
select a.*,b.time
from a , b
where a.id=b.tab1ID
order by b.time
select a.*,b.time
from ±í1 a inner join ±í2 b on a.id=b.tab1id
order by b.time
ÒÔÉÏ·½·¨¿ÉÒÔ²é³ö µ«ÊÇÈç¹û±í2ûÓмǼ ²éѯµÄ½á¹ûÊÇ¿Õ
ÓÐûÓа취²é³öÈç¹ûb.timeΪ¿Õ×Ô¶¯¼ÓÉÏ¡°¿Õ¡± È»ºó±í1µÄ¼Ç¼ÒÀÈ»ÏÔʾ°¡¡£¸÷λ°ï°ï棡£¡
Ïà¹ØÎÊ´ð£º
string ConStr="data source=C:\ceshi.db;verson=3;password=123456";
SQLiteConnection MyConnection = new SQLiteConnection(ConStr);
try
{ ......
СµÜ Ūµã¶«Î÷¿ÉÊǵ÷Óà sqlite3_prepare Õâ¸öº¯Êý select ¾ÍºÃʹ Ö»Òª ¸Ä±äÊý¾Ý¿â µÄ¾Í²»ÐÐ ±ÈÈçinsert Ö®ÀàµÄ ËÀ´°ï¸öæ°¡ ÇëÎÊÕâÊÇʲôÔÒò °¡ Óà c ȥʵÏÖµÄ
ÄãÓõÄʲô¹¤¾ß°¡?
°ÑÄã×Ô¼ºµÄ´úÂë·¢ ......
ÎÒÏëÒª½«sqliteÊý¾Ý¿âÖеÄÊý¾Ý£¬ÒÔÊ÷¿Ø¼þµÄÐÎʽ¶Á³ö£¬²¢ÇÒÏÔʾÔÚ¶Ô»°¿òÉÏÃæ£¬²»ÖªµÀÔõô×ö£¬À´Çë½Ìһϡ£
ps£º¿´µ½ÓÐʹÓÃÊ÷¿Ø¼þºÍaccessµÄ£¬ÀïÃæÓÐÊý¾Ý¿âÒýÇæÀ´Á¬½ÓÊý¾Ý¿âºÍ³ÌÐò£¬ÎÒ²»ÖªµÀSQLiteÈçºÎÓë³ÌÐòÁ¬½ÓÆð ......
ÎÒÒª°ÑÊý¾Ý±íÖеÄÊý¾Ý£¬ÒÔÊ÷µÄÐÎʽÏÔʾÔÚ¶Ô»°¿òÖС£
±ÈÈ磺
Ö»ÒªÊý¾Ý±íÖÐÓÐ3¸ö×ֶΡ¢id¡¢parentid¡¢name
ÇëÎÊÎÒÈçºÎдһЩ´úÂ뽫Êý¾Ý±íÖеÄÄÚÈÝÌîµ½Ê÷¿Ø¼þÖÐÈ¥
ÒýÓÃ
Ò»°ãÊÇÓõݹéµÄ·½·¨À´ÊµÏ ......
XML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx ......