[sqlite] Right() function

2006-11-29 Thread Cécilia Vigny

Hi,

Does SQLite supports the right(string, len) function ?

For instance :

SELECT myfield, right(myfield,5) FROM mytable
where myfield = "aaa";

I've got an error near '(' when executing this request.

Thanks.


Ce message est prot?g? par les r?gles relatives au secret des correspondances. 
Il est donc ?tabli ? destination exclusive de son destinataire. Celui-ci peut 
donc contenir des informations confidentielles. La divulgation de ces 
informations est ? ce titre rigoureusement interdite. Si vous avez re?u ce 
message par erreur, merci de le renvoyer ? l'exp?diteur dont l'adresse e-mail 
figure ci-dessus et de d?truire le message ainsi que toute pi?ce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, 
this message is intended solely for the attention of the addressee. This 
message may contain privileged or confidential information, as such the 
disclosure of these informations is strictly forbidden. If, by mistake, you 
have received this message, please return this message to the addressser whose 
e-mail address is written above and destroy this message and all files attached.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Need help - "Missing extension for native"

2006-11-17 Thread Cécilia Vigny

Hi,

I'm working with Php4, SQLite and ADOdb. I'm trying to open a database. 
See my code :


   $db = ADONewConnection('sqlite');
   $db->debug = true;
   $db-> connect('','','','test.sdb');
   $rs = $db->Execute('select * from table_test');
   print_r($rs->getRows());

The instruction $db-> connect('','','','test.sdb'); returns an error : 
"Missing extension for native".

Does anybody know what this means ?

Thank you.


Ce message est prot?g? par les r?gles relatives au secret des correspondances. 
Il est donc ?tabli ? destination exclusive de son destinataire. Celui-ci peut 
donc contenir des informations confidentielles. La divulgation de ces 
informations est ? ce titre rigoureusement interdite. Si vous avez re?u ce 
message par erreur, merci de le renvoyer ? l'exp?diteur dont l'adresse e-mail 
figure ci-dessus et de d?truire le message ainsi que toute pi?ce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, 
this message is intended solely for the attention of the addressee. This 
message may contain privileged or confidential information, as such the 
disclosure of these informations is strictly forbidden. If, by mistake, you 
have received this message, please return this message to the addressser whose 
e-mail address is written above and destroy this message and all files attached.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Character set

2006-11-16 Thread Cécilia Vigny

Hi,

is it possible to specify the character set for a table ? I would like 
my data to be in latin1 instead of utf-8.


Thanks !


Ce message est prot?g? par les r?gles relatives au secret des correspondances. 
Il est donc ?tabli ? destination exclusive de son destinataire. Celui-ci peut 
donc contenir des informations confidentielles. La divulgation de ces 
informations est ? ce titre rigoureusement interdite. Si vous avez re?u ce 
message par erreur, merci de le renvoyer ? l'exp?diteur dont l'adresse e-mail 
figure ci-dessus et de d?truire le message ainsi que toute pi?ce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, 
this message is intended solely for the attention of the addressee. This 
message may contain privileged or confidential information, as such the 
disclosure of these informations is strictly forbidden. If, by mistake, you 
have received this message, please return this message to the addressser whose 
e-mail address is written above and destroy this message and all files attached.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] index in CREATE TABLE

2006-11-15 Thread Cécilia Vigny



Mario Frasca a écrit :

Cécilia Vigny wrote:

With MySQL, it's possible to declare an index in CREATE TABLE, using 
KEY, like in this example :


CREATE TABLE  table_name (
 id int(6) NOT NULL auto_increment,
 field_name date default NULL,
 PRIMARY KEY  (id),
 KEY idx_field_name (fieldname),
) ;

I want to know if there is an equivalence with SQLite ?


maybe this is what you want:

CREATE TABLE  table_name (
id integer PRIMARY KEY NOT NULL,
field_name date default NULL
) ;
CREATE INDEX idx_field_name ON table_name(field_name);

also: have a look at http://www.sqlite.org/lang.html (SQL As 
Understood By SQLite)


(editing your code you forgot an underscore and left an extra comma)

regards,
Mario

Thank you for your correction, it is just a piece of my code that I had 
changed for the instance so it's not a problem, but shame on me ;)
What you suggest is what I had thought, I wondered whether there were 
not a solution which make it possible to do with just one request...

I think that I will use CREATE INDEX separately.


- 


To unsubscribe, send email to [EMAIL PROTECTED]
- 






Ce message est protégé par les règles relatives au secret des correspondances. 
Il est donc établi à destination exclusive de son destinataire. Celui-ci peut 
donc contenir des informations confidentielles. La divulgation de ces 
informations est à ce titre rigoureusement interdite. Si vous avez reçu ce 
message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail 
figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, 
this message is intended solely for the attention of the addressee. This 
message may contain privileged or confidential information, as such the 
disclosure of these informations is strictly forbidden. If, by mistake, you 
have received this message, please return this message to the addressser whose 
e-mail address is written above and destroy this message and all files attached.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] index in CREATE TABLE

2006-11-15 Thread Cécilia Vigny

Hi,

With MySQL, it's possible to declare an index in CREATE TABLE, using 
KEY, like in this example :


CREATE TABLE  table_name (
 id int(6) NOT NULL auto_increment,
 field_name date default NULL,
 PRIMARY KEY  (id),
 KEY idx_field_name (fieldname),
) ;

I want to know if there is an equivalence with SQLite ?


Ce message est prot?g? par les r?gles relatives au secret des correspondances. 
Il est donc ?tabli ? destination exclusive de son destinataire. Celui-ci peut 
donc contenir des informations confidentielles. La divulgation de ces 
informations est ? ce titre rigoureusement interdite. Si vous avez re?u ce 
message par erreur, merci de le renvoyer ? l'exp?diteur dont l'adresse e-mail 
figure ci-dessus et de d?truire le message ainsi que toute pi?ce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, 
this message is intended solely for the attention of the addressee. This 
message may contain privileged or confidential information, as such the 
disclosure of these informations is strictly forbidden. If, by mistake, you 
have received this message, please return this message to the addressser whose 
e-mail address is written above and destroy this message and all files attached.



-
To unsubscribe, send email to [EMAIL PROTECTED]
-