Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: New CGI Action Call

by tultalk (Monk)
on Mar 25, 2018 at 16:13 UTC ( [id://1211698]=note: print w/replies, xml ) Need Help??


in reply to Re^2: New CGI Action Call
in thread New CGI Action Call

And the call from the darkness

<- dbd_st_free_result_sets <-- dbd_st_finish <- DESTROY= undef at update_tables.cgi line 662 via at update_tab +les.cgi line 662 -> execute for DBD::mysql::st (DBI::st=HASH(0x2bbb330)~0x2bbddd8 ' +Jackson Group' 'Louis' 'Jackson' 'ZZZZZZxxxxxxxx' 'CCCCCCCC' '3' 23) +thr#1e97010 Called: dbd_bind_ph Called: dbd_bind_ph Called: dbd_bind_ph Called: dbd_bind_ph Called: dbd_bind_ph Called: dbd_bind_ph Called: dbd_bind_ph -> dbd_st_execute for 2bbd898 >- dbd_st_free_result_sets <- dbd_st_free_result_sets RC -1 <- dbd_st_free_result_sets mysql_st_internal_execute MYSQL_VERSION_ID 50558 >parse_params statement UPDATE table SET business = ?,forename = ?,las +tname = ?,password = ?,pin = ?,position = ? WHERE user_id = ? Binding parameters: UPDATE table SET business = 'Jackson Group',forena +me = 'Louis',lastname = 'Jackson',password = 'ZZZZZZxxxxxxxx',pin = ' +CCCCCCCC',position = '3' WHERE user_id = '23' --> do_error You have an error in your SQL syntax; check the manual that correspond +s to your MySQL server version for the right syntax to use near 'tabl +e SET business = 'Jackson Group',forename = 'Louis',lastname = 'Jacks +on',pas' at line 1 error 1064 recorded: You have an error in your SQL + syntax; check the manual that corresponds to your MySQL server versi +on for the right syntax to use near 'table SET business = 'Jackson Gr +oup',forename = 'Louis',lastname = 'Jackson',pas' at line 1

Looks like the dynamically created SQL statement is correct

Why it is chopped off??Who knows

Replies are listed 'Best First'.
Re^4: New CGI Action Call
by poj (Abbot) on Mar 25, 2018 at 16:29 UTC
    UPDATE table SET business = ? .. ^^^^^ this should be the table name users

    If you add RaiseError=>1 to your connect statement like this

    my $dbh = DBI->connect($dsn, $user, $pw, { RaiseError=>1 } );

    you don't need all those or die statements

    or die "Error Preparing:\n" . $stmt . "\nDBI returned: \n", $dbh->errs +tr; .. or die "Unable to execute query: " . $sth->errstr;
    poj

      Gad!! Correcting "table" to "user" and it worked.

      Humiliating. On to simplification as you suggest.

      Thanks

        You were told this an hour prior to being told again. Testing your SQL separately would be wise.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1211698]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2026-01-15 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.