erikcw wrote:
>
> Here is the full error: (sorry)
No problem! It's easier to comment with these details...
> Traceback (most recent call last):
> File "/home/erik/Desktop/wa.py", line 178, in ?
> curHandler.walkData()
> File "/home/erik/Desktop/wa.py", line 91, in walkData
> sql = """INSERT INT
Lenard Lindstrom wrote:
> >
> > I'm trying to build a SQL string
> >
> > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""",
> > (cid, ag, self.data[parent][child]['results']['test'])
>
> I am guessing you want the string formatting operator here:
>
> sql = """...""" % (cid, ...)
erikcw wrote:
> Hi,
>
> I'm trying to build a SQL string
>
> sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""",
> (cid, ag, self.data[parent][child]['results']['test'])
>
I am guessing you want the string formatting operator here:
sql = """...""" % (cid, ...)
The comma creat
On Apr 5, 12:37 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote:
> erikcw wrote:
>
> > I'm trying to build a SQL string
>
> > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""",
> > (cid, ag, self.data[parent][child]['results']['test'])
>
> This makes a tuple, though: the first element
erikcw wrote:
>
> I'm trying to build a SQL string
>
> sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""",
> (cid, ag, self.data[parent][child]['results']['test'])
This makes a tuple, though: the first element is the SQL string; the
second element contains a tuple of parameters.
On Apr 5, 11:41 am, [EMAIL PROTECTED] wrote:
> On Apr 5, 10:31 am, "erikcw" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm trying to build a SQL string
>
> > sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""",
> > (cid, ag, self.data[parent][child]['results']['test'])
>
> > It rais
On Apr 5, 10:31 am, "erikcw" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to build a SQL string
>
> sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""",
> (cid, ag, self.data[parent][child]['results']['test'])
>
> It raises this error: AttributeError: 'tuple' object has no attrib