Results 1 to 3 of 3

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User Sko4a's Avatar
    Join Date: Sep:2007
    Location: Sofia
    Posts: 199

    stored procedure MySQL

    , MySQL, stored procedure .
    . . - . , .

    Code:
    mysql> delimiter //
    mysql> CREATE PROCEDURE readtemps (devname varchar(20),temp varchar(10),humid va
    rchar(10),dewpoint varchar(10))
        -> BEGIN
        -> insert into 'monitoring'.'readings' ('date_','time_','temp','humidity','d
    ewpoint','device') values (curdate(),curtime(),temp,humid,dewpoint,devname);
        -> END
        -> //
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use near ''moni
    toring'.'readings' ('date_','time_','temp','humidity','dewpoint','device') ' at
    line 3
    "monitoring" "readings".
    MySQL 5.0.51
    CPU: C2D E8400 + CoolerMaster Hyper 212 Plus | MB: Asus P5K | RAM: 4GB Transcend AxeRam | VC: Asus EAH4850 + AC Accelero S1 rev. 2 | Case: Antec SLK3000B | PSU: AC Fusion 550R | : Altec Lansing VS2421 (2.1)

  2. #2
    Registered User
    Join Date: Jul:2005
    Location: Sofiq
    Posts: 2,798

    Code:
     insert into 'monitoring'.'readings' ('date_','time_','temp','humidity','d
    ewpoint','device') values (curdate(),curtime(),temp,humid,dewpoint,devname);

    Code:
     insert into `monitoring`.`readings` (`date_`,`time_`,`temp`,`humidity`,`dewpoint`,`device`) values (curdate(),curtime(),temp,humid,dewpoint,devname);

  3. #3
    Registered User Sko4a's Avatar
    Join Date: Sep:2007
    Location: Sofia
    Posts: 199
    ! , .
    CPU: C2D E8400 + CoolerMaster Hyper 212 Plus | MB: Asus P5K | RAM: 4GB Transcend AxeRam | VC: Asus EAH4850 + AC Accelero S1 rev. 2 | Case: Antec SLK3000B | PSU: AC Fusion 550R | : Altec Lansing VS2421 (2.1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |