C
|
copper21 7/18/2013 |
Not sure if this is going to help, but it looks like where you have your "Values" fields you are missing some things. |
![]() |
Sergey Kornilov admin 7/19/2013 |
If NumberRom is a text field you need to add single quotes around this field value in SQL query. Here is an example: UPDATE roms SET CurrentDate = '', StatusRom = 'Ocupada', UsedByCustomer = 'Some customer' WHERE NumberRom ='ROM106' |
O
|
onlline author 7/19/2013 |
Not sure if this is going to help, but it looks like where you have your "Values" fields you are missing some things. Try $rs = CustomQuery("SELECT StatusRom, UsedByCustomer FROM roms WHERE NumberRom = ".$values['NumberRom'].""); $message = 'A sala esta sendo usada pelo cliente '".$record['UsedByCustomer']."''; CustomQuery("UPDATE roms SET CurrentDate = '', StatusRom = 'Ocupada', UsedByCustomer = '".$values['NameCustomer']."' WHERE NumberRom = ".$values['NumberRom'].""); CustomQuery("UPDATE roms SET StatusRom = 'Liberada', UsedByCustomer = '', CurrentDate = GETDATE() WHERE NumberRom = ".$deleted_values['NumberRom'].""); thank you the attention but the error remains It looks like you were missing ." at the end of your field names. It should look like ".$values['NumberRom']." for numeric fields and '".$values['NameCustomer']."' for fields with characters. When setting a date, use GETDATE() if you are using SQL Server or NOW() if you are using MySQL. Brian |
O
|
onlline author 7/19/2013 |
If NumberRom is a text field you need to add single quotes around this field value in SQL query. Here is an example: UPDATE roms SET CurrentDate = '', StatusRom = 'Ocupada', UsedByCustomer = 'Some customer' WHERE NumberRom ='ROM106'
|