Re: [PHP] ADODB Insert Question (Syntax)

2007-08-09 Thread Jim Lucas

Graham Anderson wrote:

Wow.  I feel really dumb.
I thought (incorrectly) that the surrounding quotes would screw with the 
variables in the ADODB's INSERT statement.


many thanks
G

On Aug 7, 2007, at 2:06 PM, Uber Wannabe wrote:


-Original Message-
From: Graham Anderson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 07, 2007 3:34 PM
To: php-general
Subject: [PHP] ADODB Insert Question (Syntax)

Hi

What is the proper way to get the ADODB class to automatically add
quotes to the below sql ?
I'm guessing that the below fails because none of the variables get
quoted with the method, qstr.

$sql = "insert into email (to_name, to_email, from_name, from_email,
subject, message, timestamp, ip) ";
$sql .= "values ($to_name, $to_email, $from_name, $from_email,
$subject, $message, $time, $ip)";


I tried something like the below to no avail
$sql .= "values($conn->qstr($to_name), $conn->qstr
($to_email), ...)";


Is there an accepted way to place multiple $variables inside an ADODB
insert statement?

many thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-End Original Message-


Okay, I'm probably missing something, but why can't the values portion 
just

say:

"values ('$to_name', '$to_email', '$from_name',... etc.


hold on now. you might want to make sure and escape data before you just throw it into the query 
like that.


His method was just fine, but the problem is is that the $obj->method() thing wont work in a quoted 
string.


If he had E_NOTICE turned on, he would see the error.

what needs to happen is that he needs to break out of the double quotes and concat the string(s) and 
method calls together like this.


$sql .= "values(".$conn->qstr($to_name).", ".$conn->qstr($to_email).", 
...)";



... with the single quotes around the variable names?


-- N/A







--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADODB Insert Question (Syntax)

2007-08-09 Thread Graham Anderson

Wow.  I feel really dumb.
I thought (incorrectly) that the surrounding quotes would screw with  
the variables in the ADODB's INSERT statement.


many thanks
G

On Aug 7, 2007, at 2:06 PM, Uber Wannabe wrote:


-Original Message-
From: Graham Anderson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 07, 2007 3:34 PM
To: php-general
Subject: [PHP] ADODB Insert Question (Syntax)

Hi

What is the proper way to get the ADODB class to automatically add
quotes to the below sql ?
I'm guessing that the below fails because none of the variables get
quoted with the method, qstr.

$sql = "insert into email (to_name, to_email, from_name, from_email,
subject, message, timestamp, ip) ";
$sql .= "values ($to_name, $to_email, $from_name, $from_email,
$subject, $message, $time, $ip)";


I tried something like the below to no avail
$sql .= "values($conn->qstr($to_name), $conn->qstr
($to_email), ...)";


Is there an accepted way to place multiple $variables inside an ADODB
insert statement?

many thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-End Original Message-


Okay, I'm probably missing something, but why can't the values  
portion just

say:

"values ('$to_name', '$to_email', '$from_name',... etc.

... with the single quotes around the variable names?


-- N/A





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADODB Insert Question (Syntax)

2007-08-07 Thread Richard Lynch
On Tue, August 7, 2007 3:34 pm, Graham Anderson wrote:
> What is the proper way to get the ADODB class to automatically add
> quotes to the below sql ?
> I'm guessing that the below fails because none of the variables get
> quoted with the method, qstr.
>
> $sql = "insert into email (to_name, to_email, from_name, from_email,
> subject, message, timestamp, ip) ";
> $sql .= "values ($to_name, $to_email, $from_name, $from_email,
> $subject, $message, $time, $ip)";
>
>
> I tried something like the below to no avail
> $sql .= "values($conn->qstr($to_name), $conn->qstr
> ($to_email), ...)";
>
>
> Is there an accepted way to place multiple $variables inside an ADODB
> insert statement?

I thing the qstr function is what you want, but you'd have to ask an
ADODB list about that...

If it bothers you to have to type $conn->qstr so much, you could do
something like:

$values = array($to_name, $to_email, ...);
$values_sql = array_map($values, array($conn, 'qstr'));
$sql .= " values (" . implode(',', $values_sql) . " )";

It's possible that qstr only ESCAPES any embedded apostrophes or other
nasty characters, and you really want:
$sql .= " values ('" . implode("', '", $values_sql) . "' )";

But, again, the ADODB list would be your best bet for finding out what
qstr actually does.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] ADODB Insert Question (Syntax)

2007-08-07 Thread Uber Wannabe
-Original Message-
From: Graham Anderson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 07, 2007 3:34 PM
To: php-general
Subject: [PHP] ADODB Insert Question (Syntax)

Hi

What is the proper way to get the ADODB class to automatically add  
quotes to the below sql ?
I'm guessing that the below fails because none of the variables get  
quoted with the method, qstr.

$sql = "insert into email (to_name, to_email, from_name, from_email,  
subject, message, timestamp, ip) ";
$sql .= "values ($to_name, $to_email, $from_name, $from_email,  
$subject, $message, $time, $ip)";


I tried something like the below to no avail
$sql .= "values($conn->qstr($to_name), $conn->qstr 
($to_email), ...)";


Is there an accepted way to place multiple $variables inside an ADODB  
insert statement?

many thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-End Original Message-


Okay, I'm probably missing something, but why can't the values portion just
say:

"values ('$to_name', '$to_email', '$from_name',... etc.

... with the single quotes around the variable names?


-- N/A

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ADODB Insert Question (Syntax)

2007-08-07 Thread Graham Anderson

Hi

What is the proper way to get the ADODB class to automatically add  
quotes to the below sql ?
I'm guessing that the below fails because none of the variables get  
quoted with the method, qstr.


$sql = "insert into email (to_name, to_email, from_name, from_email,  
subject, message, timestamp, ip) ";
$sql .= "values ($to_name, $to_email, $from_name, $from_email,  
$subject, $message, $time, $ip)";



I tried something like the below to no avail
$sql .= "values($conn->qstr($to_name), $conn->qstr 
($to_email), ...)";



Is there an accepted way to place multiple $variables inside an ADODB  
insert statement?


many thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADODB store session to database

2006-06-07 Thread chris smith

On 6/7/06, weetat <[EMAIL PROTECTED]> wrote:

Hi all ,

   I am having problem in store session in the database . Below is the
example code from code.


Ask the adodb guys.

http://adodb.sourceforge.net/#mail

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ADODB store session to database

2006-06-07 Thread weetat

Hi all ,

  I am having problem in store session in the database . Below is the 
example code from code.


The issue is that the code run ok , however the expireref fields is not 
updated in the sessions table, below is the sessions schema :


CREATE TABLE `sessions` (
  `sesskey` varchar(32) NOT NULL default '',
  `expiry` int(11) unsigned NOT NULL default '0',
  `expireref` varchar(64) default '',
  `data` longtext,
  PRIMARY KEY  (`sesskey`),
  KEY `expiry` (`expiry`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |


Anybody have ideas why all fields are updated except expireref field ?


Notify Expiring=$ref, sessionkey=$key";
}

$ADODB_SESSION_DRIVER='mysql';
$ADODB_SESSION_CONNECT='';
$ADODB_SESSION_USER ='';
$ADODB_SESSION_PWD ='';
$ADODB_SESSION_DB ='';

$ADODB_SESS_DEBUG = 99;
session_start();
$userdata = new User();
$_SESSION['USER_NAME'] = $userdata->getUsername();
$ADODB_SESSION_EXPIRE_NOTIFY =array('USER_NAME','NotifyExpire');


ob_start();
include('./library/adodb/session/adodb-cryptsession.php');

adodb_session_regenerate_id();

$_SESSION['MONKEY'] = array('1','abc',44.41);
if (!isset($_GET['nochange'])) @$_SESSION['AVAR'] += 1;



?>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ADODB vs PHP extension

2005-09-13 Thread Dean Maunder
Hi,
Can someone tell me what are the differences between ADODB and using the 
compiled-in MSSQL extension?  Which one is faster?  What are the 
benefits/pitfalls of using either?
Thanks
Dean.
 


[PHP] adodb paging problem

2005-02-25 Thread pURbA
i've searched on the internet about my problem that i
have, and ended up with nothing. i believe some of u
guys have faced this problem before.

here is the problem:
i have a table for books, and want to display it using
adodb-pager.

this is my select state: select * from books where
booktitle like '%php%'; so I call the ADODB_Pager
constructor:
$pager = new ADODB_Pager($db,$qr1,'books',true);

i limited the books that i want to display by setting
the $pager->Render($rows=5);

---
|< << 1 2 >> >| [header]
---
ISBN | Title | Author |
...
...

but when i click the next button (>>), header becomes
---
|< << 1 2 3 >> >| [header]
---
ISBN | Title | Author |
...
...

it becomes 3 pages instead of 2. is it related to
adodb-session? i use my own session class.

any help would be appreciated... ^_^

thanks!

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ADOdb db abstraction library moved to sourceforge

2004-06-15 Thread John Lim
Hello,

ADOdb is a popular database abstraction library for PHP.  It supports
a very large number of databases, including MySQL, PostgreSQL,
Firebird, Interbase, SQLite, Oracle, Frontbase, DB2, SAP DB, Sybase,
Informix, Netezza, Access, VFP, MS SQL, LDAP, ODBTP, ODBC, etc.

Due to system outages at the current site, the home page of ADOdb
has moved to sourceforge.

Kindly update your links to

http://adodb.sourceforge.net/

Given the move to sourceforge, we have decided to take advantage
of its services and we have created 2 new mailing lists:

adodb-news: low volume moderated list for important news
http://lists.sourceforge.net/lists/listinfo/adodb-news

adodb-general: for general postings
http://lists.sourceforge.net/lists/listinfo/adodb-general

Bugs should still be reported at the existing forums at
http://phplens.com/lens/lensforum/topics.php?id=4

Thank you.

John Lim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread Lester Caine
Gabe wrote:

It sort of did.  It may have corrected that error, but now I get a new 
error:

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Operation must use an updateable query., SQL state S1000 in 
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an 
updateable query.

What do you think?
I see you have solved this - I only use Access when I'm moving customers 
problems away from it :)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread Gabe
Thanks Dave.  It's working now.  I searched many different places for an 
answer and yet for whatever reason, I just didn't check Google.  We're 
all allowed a few brain mishaps, right?   :-)

Thanks again.

David O'Brien wrote:

After googling the error message for you, I found about a zillion pages
which all basically say the same thing.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q175168

-Dave

At 11:01 AM 4/21/2004, Gabe wrote:

Here's another version of the SQL statement and I get  a different
error now.  When I copy and paste this exact same SQL statement into an
update query in Access it works fine.  When I try to use it in my PHP
code, I get the following error:
SQL Statement:
UPDATE tblFAQ_Book SET fldTitle = 'one more test' WHERE (autoBookID= 1);
Error Message:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access
Driver] Operation must use an updateable query., SQL state S1000 in
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query.
Thanks

Curt Zirzow wrote:

* Thus wrote Gabe ([EMAIL PROTECTED]):

...
(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more 
test" WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.


Recheck the spelling of column names and table names.
Curt


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread David O'Brien
After googling the error message for you, I found about a zillion pages
which all basically say the same thing.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q175168

-Dave

At 11:01 AM 4/21/2004, Gabe wrote:
Here's another version of the SQL statement and I get  a different
error now.  When I copy and paste this exact same SQL statement into an
update query in Access it works fine.  When I try to use it in my PHP
code, I get the following error:
SQL Statement:
UPDATE tblFAQ_Book SET fldTitle = 'one more test' WHERE (autoBookID= 1);
Error Message:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access
Driver] Operation must use an updateable query., SQL state S1000 in
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query.
Thanks

Curt Zirzow wrote:

* Thus wrote Gabe ([EMAIL PROTECTED]):

...
(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.
Recheck the spelling of column names and table names.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread David O'Brien
At 11:01 AM 4/21/2004, you wrote:
Here's another version of the SQL statement and I get  a different
error now.  When I copy and paste this exact same SQL statement into an
update query in Access it works fine.  When I try to use it in my PHP
code, I get the following error:
SQL Statement:
UPDATE tblFAQ_Book SET fldTitle = 'one more test' WHERE (autoBookID= 1);
Error Message:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access
Driver] Operation must use an updateable query., SQL state S1000 in
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query.
this sounds like your are updating the table with exactly the same values 
that are already present?

Have you tried it on different values to see if it works or just the ones 
you paste into access?

-Dave


Thanks

Curt Zirzow wrote:

* Thus wrote Gabe ([EMAIL PROTECTED]):

...
(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.
Recheck the spelling of column names and table names.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


David G. O'Brien
Web Services Coordinator / Systems Administrator
NACCRRA
The Nation's Network of Child Care Resource & Referral
1319 F Street NW, Suite 500
Washington, DC 20004
(202) 393-5501 ext. 113
(202) 393-1109 fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread Gabe
Here's another version of the SQL statement and I get  a different
error now.  When I copy and paste this exact same SQL statement into an
update query in Access it works fine.  When I try to use it in my PHP
code, I get the following error:
SQL Statement:
UPDATE tblFAQ_Book SET fldTitle = 'one more test' WHERE (autoBookID= 1);
Error Message:
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access
Driver] Operation must use an updateable query., SQL state S1000 in
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query.
Thanks

Curt Zirzow wrote:

* Thus wrote Gabe ([EMAIL PROTECTED]):

...
(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.


Recheck the spelling of column names and table names.

Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread Gabe
It sort of did.  It may have corrected that error, but now I get a new 
error:

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Operation must use an updateable query., SQL state S1000 in 
SQLExecDirect in d:\adodb\drivers\adodb-odbc.inc.php on line 504
S1000: [Microsoft][ODBC Microsoft Access Driver] Operation must use an 
updateable query.

What do you think?

Lester Caine wrote:
Gabe wrote:

I double checked the names.  Everything looks okay.  Another ideas?


Did the ADOdb list answer not work?
http://phplens.com/lens/lensforum/msgs.php?id=9285
Single and double quotes can be a problem in SQL.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-21 Thread Lester Caine
Gabe wrote:

I double checked the names.  Everything looks okay.  Another ideas?
Did the ADOdb list answer not work?
http://phplens.com/lens/lensforum/msgs.php?id=9285
Single and double quotes can be a problem in SQL.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-20 Thread John W. Holmes
From: "Gabe" <[EMAIL PROTECTED]>

> I double checked the names.  Everything looks okay.  Another ideas?

> >>(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test"
> >>WHERE (tblFAQ_Book.autoBookID = 1)
> >>
> >>Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access
> >>Driver] Too few parameters. Expected 1., SQL state 07001 in
> >>SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
> >>07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
> >>Expected 1.

What if you just tried the following query:

UPDATE tblFAQ_Book SET fldTitle = "one more test"
WHERE autoBookID = 1

Does access really need the tablename.column name syntax?

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADOdb SQL Updates

2004-04-20 Thread Gabe
I double checked the names.  Everything looks okay.  Another ideas?

Curt Zirzow wrote:
* Thus wrote Gabe ([EMAIL PROTECTED]):

...
(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.


Recheck the spelling of column names and table names.

Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb SQL Updates

2004-04-20 Thread Curt Zirzow
* Thus wrote Gabe ([EMAIL PROTECTED]):
> ...
> (access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
> WHERE (tblFAQ_Book.autoBookID = 1)
> 
> Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
> Driver] Too few parameters. Expected 1., SQL state 07001 in 
> SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
> 07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
> Expected 1.

Recheck the spelling of column names and table names.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] ADOdb SQL Updates

2004-04-20 Thread Jay Blanchard
[snip]
I'm trying to do a simple update to an access database using the ADOdb 
library.

Any help is much appreciated!
[/snip]

What error message are you getting? You are outputting an error message
when queries fail, aren't you? Does the connected user have permission
to perform updates on the specified table?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ADOdb SQL Updates

2004-04-20 Thread Gabe
I'm trying to do a simple update to an access database using the ADOdb 
library.  For some reason I can't get it to work.  I can however, get a 
simple select statment to work just fine.  Take a look at my code below 
as well as the error message.  Maybe someone can help me out.  As you'll 
see below there isn't an error generated from the select statement, but 
I do get one from the Update statment.  The error says there are too few 
parameters, but I'm not sure what else I need.  *disclaimer* - my SQL 
skills are not real strong

Any help is much appreciated!

 CODE *


$sql = "SELECT * FROM tblFAQ_Book WHERE autoBookID = 1";

$rs = $db_conn->Execute($sql);

$updateSQL = "UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = \"one more 
test\" WHERE (tblFAQ_Book.autoBookID = 1)";

$db_conn->Execute($updateSQL);
$db_conn->Close();
 ERROR MESSAGE 

(access): SELECT * FROM tblFAQ_Book WHERE autoBookID = 1

(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ADOdb Operator question

2004-04-12 Thread Gabe
That helps, thanks!


"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Gabe ([EMAIL PROTECTED]):
> > If you're using ADOdb, what is the name, purpose, and function of this
> > operator?
> >
> > ->
> >
> > e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);
>
> The $conn variable is a adodb object that has methods and
> properties associated with it.  The -> tells php to access the
> property or method of the object.
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADOdb Operator question

2004-04-08 Thread Curt Zirzow
* Thus wrote Gabe ([EMAIL PROTECTED]):
> If you're using ADOdb, what is the name, purpose, and function of this
> operator?
> 
> ->
> 
> e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);

The $conn variable is a adodb object that has methods and
properties associated with it.  The -> tells php to access the
property or method of the object.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADOdb Operator question

2004-04-08 Thread Gabe
Yeah, I looked at that page, but didn't see any specifications for it.  I
guess I'll probably just have to use the tried and true method of "trial and
error".

Thanks Matt.

"Matt Matijevich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [snip]
> e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);
> [/snip]
>
> http://www.php.net/oop will give you some help.
>
> I am not even sure if I can explain it correctly.
>
> I believe you would say use -> to call object methods and -> to get/set
> the class variables.  I am sure someone can give a better explanation
> than that, or correct me if I am wrong.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADOdb Operator question

2004-04-08 Thread Gabe
I tried the URL you supplied but I didn't see any reference to the operator
in question.  I hope I'm not blind


"Alex Hogan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > If you're using ADOdb, what is the name, purpose, and function of this
> > operator?
> >
> > ->
> >
> > e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);
> >
> > I can follow some tutorials, but I'm just not sure when I need to use it
> > and
> > when I don't.
>
> This is an explanation that's in the manual.
>
> $conn->Open("Provider=SQLOLEDB; Data Source=localhost;Initial
> Catalog=database; User ID=user; Password=password");
>
> http://www.php.net/manual/en/ref.com.php
>
>
>
> alex hogan
>
>
> > -Original Message-
> > From: Gabe [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 08, 2004 1:43 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] ADOdb Operator question
> >
> > If you're using ADOdb, what is the name, purpose, and function of this
> > operator?
> >
> > ->
> >
> > e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);
> >
> > I can follow some tutorials, but I'm just not sure when I need to use it
> > and
> > when I don't.
> >
> > Thanks
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> **
> The contents of this e-mail and any files transmitted with it are
> confidential and intended solely for the use of the individual or
> entity to whom it is addressed.  The views stated herein do not
> necessarily represent the view of the company.  If you are not the
> intended recipient of this e-mail you may not copy, forward,
> disclose, or otherwise use it or any part of it in any form
> whatsoever.  If you have received this e-mail in error please
> e-mail the sender.
> **
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] ADOdb Operator question

2004-04-08 Thread Alex Hogan
> If you're using ADOdb, what is the name, purpose, and function of this
> operator?
> 
> ->
> 
> e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);
> 
> I can follow some tutorials, but I'm just not sure when I need to use it
> and
> when I don't.

This is an explanation that's in the manual.

$conn->Open("Provider=SQLOLEDB; Data Source=localhost;Initial
Catalog=database; User ID=user; Password=password");

http://www.php.net/manual/en/ref.com.php



alex hogan


> -Original Message-
> From: Gabe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 08, 2004 1:43 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] ADOdb Operator question
> 
> If you're using ADOdb, what is the name, purpose, and function of this
> operator?
> 
> ->
> 
> e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);
> 
> I can follow some tutorials, but I'm just not sure when I need to use it
> and
> when I don't.
> 
> Thanks
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] ADOdb Operator question

2004-04-08 Thread Matt Matijevich
[snip]
e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);
[/snip]

http://www.php.net/oop will give you some help.

I am not even sure if I can explain it correctly.

I believe you would say use -> to call object methods and -> to get/set
the class variables.  I am sure someone can give a better explanation
than that, or correct me if I am wrong.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ADOdb Operator question

2004-04-08 Thread Gabe
If you're using ADOdb, what is the name, purpose, and function of this
operator?

->

e.g. $conn->Connect(false, 'scott', 'tiger', $oraname);

I can follow some tutorials, but I'm just not sure when I need to use it and
when I don't.

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ADOdb installation

2004-04-02 Thread Matt Matijevich
Would each virtual host need to have a directory with the ADOdb scripts?

No

Just put the adodb scripts in the include_path, or just have a
designdated place on your windows bow for adodb, then in you include
statement just use something like 

include('c:\adodb\adodb.php'); //not exactly sure what the include is
called

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ADOdb installation

2004-04-02 Thread Gabe
For those of you that are using ADOdb, hopefully you can help me out.  I'm
evaluating PHP on IIS and I was curious if I had to have a directory with
the ADOdb scripts for every virtual host?

For example, if I had three virtual hosts at three different IP's:

210.210.210.200
210.210.210.201
210.210.210.202

Would each virtual host need to have a directory with the ADOdb scripts?  Or
would it be possible to setup a virtual directory in each virtual host that
points to one folder that has the scripts?  It seems a little wasteful and
inefficient to have to copy the scripts for each virtual host.  Or does
someone know of a good way to do this?

Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] adodb and php5

2003-09-09 Thread SLanger
Hello 

Did you compile mysql or any of the other databases into php5? As far as I 
know php5 does not come with mysql anymore because of some licence issues. 
So if you haven't compiled it yourself it shouldn't be available and hence 
not supported by adodb.

Just a guess

Regards
Stefan Langer

Re: [PHP] adodb and php5

2003-09-08 Thread Gilberto Garcia Jr.
I use adodb cause I need an abstraction layer for database cause the
application can run under mysql, mssql, oracle and pgsql. so i have one
config file that has the parameters for the conection.

this is the reason for me use adodb layer.

now, about ADONewConnection(), this function is from adodb layer.

php.weblogs.com/adodb


- Original Message - 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Gilberto Garcia Jr." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 08, 2003 5:45 PM
Subject: RE: [PHP] adodb and php5


[snip]
Does anyone had tested ADODB with php5?


I can make a query, print the recordcount but when i try to show the
result i got nothing

PConnect('some', 'some', 'some', 'some');
[/snip]

You do not need the ADODB connection if you are using MySQL. Are you
connecting to Access or MS SQL? If you are using MySQL look at
http://www.php.net/mysql_connect . For instance, the function you use
above ADONewConnection() does not exist as a PHP function. Do you
declare the function in adodb.inc.php?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] adodb and php5

2003-09-08 Thread Jay Blanchard
[snip]
Does anyone had tested ADODB with php5?
[/snip]

D'oh **slapping forhead** I shouldn't be driving this late on Monday
afternoon.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] adodb and php5

2003-09-08 Thread CPT John W. Holmes
From: "Gilberto Garcia Jr." <[EMAIL PROTECTED]>


> Does anyone had tested ADODB with php5?
> I can make a query, print the recordcount but when i try to show the
result i got nothing
>
> while (!$qry->EOF) {
> echo $qry->fields['campo'] . "";
>
> $qry->MoveNext();
> }

You might want to ask on the adodb forums:
http://phplens.com/lens/lensforum/topics.php?id=4

Does this work?

while($r = $qry->FetchRow($qry))
{ echo $r['campo']; }

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] adodb and php5

2003-09-08 Thread Jay Blanchard
[snip]
Does anyone had tested ADODB with php5?


I can make a query, print the recordcount but when i try to show the
result i got nothing

PConnect('some', 'some', 'some', 'some');
[/snip]

You do not need the ADODB connection if you are using MySQL. Are you
connecting to Access or MS SQL? If you are using MySQL look at
http://www.php.net/mysql_connect . For instance, the function you use
above ADONewConnection() does not exist as a PHP function. Do you
declare the function in adodb.inc.php?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] adodb and php5

2003-09-08 Thread Gilberto Garcia Jr.
Does anyone had tested ADODB with php5?


I can make a query, print the recordcount but when i try to show the result i got 
nothing

PConnect('some', 'some', 'some', 'some');

$seleciona = "
select campo
from tabela
";

$qry =& $conn->Execute($seleciona);

if (!$qry) {
echo $conn->ErrorMsg();
echo "erro";
}
else {
while (!$qry->EOF) {
echo $qry->fields['campo'] . "";

$qry->MoveNext();
}
}
?>





any help?



thanks


[PHP] adodb + oracle 8i

2003-03-12 Thread Gilberto Garcia Jr.
Somebody here use adodb with oracle?

I´m triyng to use that, but I´m noting realize how to estabilish a conection
with oracle.

I´m getting the folowing error:

Fatal error: Call to undefined function: ora_plogon() in
e:\inetpub\wwwroot\hosted\EnsinoNet\php\adodb\drivers\adodb-oracle.inc.php
on line 105


I´m triyng to conect with oracle with the folowing command:

$conn =& ADONewConnection('oracle');
$conn->PConnect(false, 'user', 'pass', 'bata_base_name');

can some one help?

thanks
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/03


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] ADOdb

2002-09-24 Thread Steve Bradwell

One thing that has helped me was to write a db class and use it to connect
to mysql, then all you have to do is change the class, and not all your code
when you change the db.
-Steve

-Original Message-
From: Brendon G [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 4:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP] ADOdb


Just curious as to what the general consensus of opinion is on the following
class.  Do many of you use it?.
http://php.weblogs.com/ADOdb

Coming over to PHP from ASP (I'm not really interested in learning .Net at
the moment) I like that I can switch databases allot faster if the need
occurs by using ADOdb.  If I had written code just using MySQLconnect I'd
have a hell of a time in the future.

Cheers

Brendon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ADOdb

2002-09-24 Thread Brendon G

Just curious as to what the general consensus of opinion is on the following
class.  Do many of you use it?.
http://php.weblogs.com/ADOdb

Coming over to PHP from ASP (I'm not really interested in learning .Net at
the moment) I like that I can switch databases allot faster if the need
occurs by using ADOdb.  If I had written code just using MySQLconnect I'd
have a hell of a time in the future.

Cheers

Brendon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] ADODB - whaddya think?

2002-05-17 Thread Cal Evans

I've been using it for about 4 months and it's very stable.

=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-Original Message-
From: Jerome Houston [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 4:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] ADODB - whaddya think?


Testimonial time!

Despite ROCK STAR assistance from a PHP developer, I'm having troubles with
mssql_*() functions.  most of the problems are gone (or being fixed by some
AWESOME people), but to make use of those fixes, i've got to use php v
4.3-dev.  and there's other bugs in that (as there should be).  so i've been
looking for alternatives to using the mssql functions...  and i've found
something that looks promising: ADODB.  for those of you who don't know,
some people have just written some code that attempts (and looks as if it
does a pretty good job) of unifying ODBC calls for lots of different
databases.  their website: http://php.weblogs.com/ADODB

What i want to know is:  does anyone have experience with these libraries?
I tested them briefly, and it seemed to work like a charm, but so did the
mssql_*() functions, until i got into some of the nitty-gritty uses of the
DB.  Will lots of little bugs come about, the more i use it?  or have they
ironed most of that out?

thanks for your opinons, and i apologize for possibly spurring another
loquacious debate amongst smart people :-)

-jerome

_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ADODB - whaddya think?

2002-05-17 Thread Jerome Houston

Testimonial time!

Despite ROCK STAR assistance from a PHP developer, I'm having troubles with 
mssql_*() functions.  most of the problems are gone (or being fixed by some 
AWESOME people), but to make use of those fixes, i've got to use php v 
4.3-dev.  and there's other bugs in that (as there should be).  so i've been 
looking for alternatives to using the mssql functions...  and i've found 
something that looks promising: ADODB.  for those of you who don't know, 
some people have just written some code that attempts (and looks as if it 
does a pretty good job) of unifying ODBC calls for lots of different 
databases.  their website: http://php.weblogs.com/ADODB

What i want to know is:  does anyone have experience with these libraries?  
I tested them briefly, and it seemed to work like a charm, but so did the 
mssql_*() functions, until i got into some of the nitty-gritty uses of the 
DB.  Will lots of little bugs come about, the more i use it?  or have they 
ironed most of that out?

thanks for your opinons, and i apologize for possibly spurring another 
loquacious debate amongst smart people :-)

-jerome

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ADODB?

2001-08-20 Thread Jochen Kaechelin

is there a source for further information
connecting to databases with ADODB for PHP4?

I only know http://php.weblogs.com/ADODB


--
WA-P : Jochen Kaechelin
Programmierung - Beratung - Hosting
Stuttgarter Strasse 3, D-73033 Göppingen
Tel. 07161 - 92 95 94, Fax 92 95 98


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ADODB Library

2001-08-17 Thread Jochen Kaechelin

Anyone made good experiences
with the ADODB Library for PHP4?

--
WA-P : Jochen Kaechelin
Programmierung - Beratung - Hosting
Stuttgarter Strasse 3, D-73033 Göppingen
Tel. 07161 - 92 95 94, Fax 92 95 98


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] adodb 1.10 released

2001-05-19 Thread John Lim

http://php.weblogs.com/adodb

Database wrapper library 1.10. Now supports cached recordsets.

Example below:

include('adodb.inc.php');
include('tohtml.inc.php');
$ADODB_CACHE_DIR = '/usr/local/adodbcache';
$conn = &ADONewConnection('oracle');/* Oracle 8, use 'oci8' */
$conn->PConnect('','scott','tiger');
$rs = $conn->CacheExecute(15,'select * from table');
rs2html($rs); /* recordset to html table */

The 15  in CacheExecute() indicates that the recordset will be cached
for 15 seconds. Subsequent calls with this SQL statement will use the
 cached results until the 15 seconds expires.







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]