Ôõô°Ñpowerdesignerµ¼³öµÄsqlÓÃPHPµ¼ÈëMysQLÊý¾Ý¿â
ÎÒÃÇÖªµÀÓÃpowerdesignerµ¼³öµÄsqlÎļþºó׺Ϊ'.sql'£»ÓÃphpmyadminºÜÈÝÒ×µ¼ÈëMysQLÊý¾Ý¿â£¬µ«ÊÇÓÃPHPÔõôµ¼ÈëÊý¾Ý¿âÄØ?
ÎÒÓÃpowerdesignerÉè¼ÆÒ»¸öÊý¾Ý¿âºóµ¼³ösqlÎļþ£¨Ò»¸öͶƱϵͳ£©Îª'vote.sql'£»
ÎļþÄÚÈÝΪ£¨Ò»Ð©sqlÓï¾äºÍ×¢ÊÍ£©£º
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2010-4-22 17:11:50 */
/*==============================================================*/
drop table if exists account_charge;
drop table if exists account_cost;
drop table if exists account_info;
drop table if exists charge_way;
drop table if exists user_askanswer;
drop table if exists user_info;
drop table if exists vote_fake;
drop table if exists vote_info;
drop table if exists vote_item;
drop table if exists vote_title;
drop table if exists vote_type;
/*==============================================================*/
/* Table: account_charge */
/*==============================================================*/
create table account_charge
(
chargeid int not null,
chargewayid int not null,
accountid
Ïà¹ØÎĵµ£º
ÉÏһƪÎÒÃǽ²µ½Á´½Óµ½ Edit.php?id= À´ÐÞ¸ÄÊý¾Ý£¬ºóÀ´ÎÒÏëÁËһϣ¬ÆäʵҲ¿ÉÒÔÖ±½ÓÀûÓà Input.php À´ÐÞ¸ÄÊý¾Ý£¬ÕâÑù¸üÈÝÒ×¹ÜÀí£¬½ÚÊ¡Á˲»±ØÒªµÄ¿Õ¼ä
Input.php¿ÉÒÔÕâÑùÁ´½Ó£ºInput.php?id=[Num]&action=[Num]
id¼´¼Ç¼ID£¬Ä¬ÈÏΪ-1
actionΪ¶¯×÷£¬Ä¬ÈÏΪ0 £¬ Ϊ0ʱ´ú±íÌí¼ÓеļǼ£¬Îª1ʱÔòÐ޸ļǼ
In ......
1. °²×°mysqlµÄʱºòÑ¡Ôñ×Ö·û¼¯utf8
2. °²×°½áÊøºóÐÞ¸Ämy.ini,ÓÐÁ½¸öµØ·½ÒªÐ޸ģ¬
[mysql] default-character-set=gbk
# The default character set that will be used when a new schema or table is
# created and no character set ......
¼ÙÈçÎÒÃǵÄmysqlÓÐÒ»¸ö¼ÆÊýÆ÷£¬¶øÕâ¸ö¼ÆÊýÆ÷ÐèÒªÎÒÃÇÖØÐÂͳ¼Æ£¬Ôõô°ìÄØ£¿
Ó¦Óó¡¾°£¬±ÈÈç˵ÓÐÒ»¸öÉ̳¡£¬Ã¿ÂôÒ»¸ö²úÆ·¶¼²úÉúÒ»¸öÁ÷Ë®£¬È»ºóÎÒÃÇÐèÒªÖªµÀÿ±ÊÁ÷Ë®ÊǸòúÆ·µÚ¼¸´Î³öÊ۵ģ¬ÕâÑù˵¿ÉÄܲ»Ã÷°×£¬ÎÒÄÃÒ»¸öÏêϸµÄÊý¾Ý
¾ÙÀý°É¡£
recordID,productID,productType,sellDate,counter
1, 1, 1, '2010-1-15 15:20:10 ......
½ñÌì²âÊÔwebÏîĿн¨ÁËÒ»¸öÊý¾Ý¿â£¬½á¹û±¨´í,ÒÔÇ°µÇ¼ֱ½ÓÑ¡Ôñ'WindowsÉí·ÝÑéÖ¤',²¢Ã»ÓÐʲôÎÊÌâ³öÏÖ!¿ÉÇ°¶Îʱ¼ä²ÉÓÃ'SQLSERVERÉí·ÝÑéÖ¤'È¥µÇ¼,ËæÖ®µÄÎÊÌâ¾ÍÀ´ÁË.ÎÞÂÛÓÃʲô·½·¨¾ÍÊÇÒ»¸ö½á¹û³ö´í! ³ö´íµÄÔÒòÊÇ:'Óû§ 'sa' µÇ¼ʧ°Ü¡£¸ÃÓû§Óë¿ÉÐÅ SQL Server Á¬½ÓÎÞ¹ØÁª'.½ñÌìÉÏÍøÉϲéÁË°ëÌ컹ÊǸ㲻¶¨,×îºó¾¹ýÍøÉϺÍÊéÉ ......
1. select top pageSize
* from table where id not in(select top((pageNo-1)*pageSize
) id from table order by id asc)
2. select * from table where id<=pageSize*pageNo
and id>(pageNo-1)*pageSize
order by id asc
×¢£º
pagesizeÿҳÏÔʾµÄ¼Ç¼Êý
pageNoµ±Ç°µÚ¼¸Ò³
......