- <?php
-
require_once ("inc/dbconnection.php");
-
-
class provider_function
-
{
-
public $select_query;
-
public $select_result;
-
public $insert_query;
-
public $insert_result;
-
public $update_query;
-
public $update_result;
-
public $select_row;
-
public function select($id)
-
{
-
$this->select_query = "SELECT * FROM m_tbl_ServiceProvider where intProviderID =".$id;
-
$this->select_result = mysql_query($this->select_query) or die(mysql_error());
-
$this->select_row = mysql_fetch_assoc($this->select_result);
-
return $this->select_row;
-
}
-
public function insert($bo)
-
{
-
$this->insert_query="INSERT INTO m_tbl_ServiceProvider (str_Name,str_AgencyName,str_Address1,str_Address2,str_City,int_PinCode,str_Email,str_FromDay,str_ToDay,str_HourAm,str_HourPm,int_PhoneNumber,str_LoginName,str_Password,str_ProviderType) VALUES
-
('".$bo->str_Name."','".$bo->str_AgencyName."','".$bo->str_Address1."','".$bo->str_Address2."','".$bo->str_City."',".$bo->int_PinCode.",'".$bo->str_Email."','".$bo->str_FromDay."','".$bo->str_ToDay."','".$bo->str_HourAm."','".$bo->str_HourPm."',".$bo->int_PhoneNumber.",'".$bo->str_LoginName."','".$bo->str_Password."','".$bo->str_ProviderType."')";
-
$this->insert_result = mysql_query($this->insert_query) or die(mysql_error());
-
return $this->insert_result;
-
}
-
public function update($id,$bo)
-
{
-
-
$this->update_query = "update m_tbl_ServiceProvider set str_Name = '".$bo->str_Name."',str_AgencyName = '".$bo->str_AgencyName."',str_Address1 = '".$bo->str_Address1."',str_Address2 = '".$bo->str_Address2."',str_City = '".$bo->str_City."',
-
int_PinCode=".$bo->int_PinCode.",str_Email='".$bo->str_Email."',str_FromDay='".$bo->str_FromDay."',str_ToDay='".$bo->str_ToDay."',str_HourAm='".$bo->str_HourAm."',str_HourPm='".$bo->str_HourPm."',
-
int_PhoneNumber=".$bo->int_PhoneNumber.",str_LoginName='".$bo->str_LoginName."',str_Password='".$bo->str_Password."',str_ProviderType = '".$bo->str_ProviderType."' where intProviderID=".$id;
-
$this->update_result = mysql_query($this->update_query) or die(mysql_error());
-
return $this->update_result;
-
}
-
}
-
?>
when ever i call this function the following error wil come please clarify my problem
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 ''janu','sat','Handyman Services')' at line 2
1 1144 Atli 5,058
Expert 4TB
On line #23, there looks like there is something wrong with the $bo->int_PhoneNumber value. Are you sure it has a value?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Wayne |
last post by:
Hi,
Can someone possibly assist me in finding the error in the following:
echo "<p><strong>".($i+1).". Login: ";
I get the following error returned when doing a syntax check
PHP Parse...
|
by: beary |
last post by:
Could someone please tell me what's wrong with the code below. It worked fine the first time, then I cleared the table (results) and tried it again, but got the message "You have an error in your SQL...
|
by: mmarif4u |
last post by:
Hi everybody...
I want to enter values to db like the following,,,
Format is like this (810605-14-6356)
This is the rite format, No a to z letters...
6 digits then - then 2 digits then - then 4...
|
by: markodilore |
last post by:
Hey Guys, you helped me once when I tryied to create a database : "Access denied for user ''@'localhost' ". On my Mac OS 10.4, I had no problem creating database and modifying it from the terminal....
|
by: bobf |
last post by:
I am using a program 'My Contact Table' which is a code generator program. It allows you to easily create a PHP/MySQL web application without writing any code.
I am trying to create an additional...
|
by: FM |
last post by:
Hi there:
My question is about checking my sql-syntax against DB2UDB V9 throug
JDBC 2.0
Is there a way to check my syntax,for example "select * from T1"?
Thank you for your help.
Regards,
|
by: zmee |
last post by:
Hi,
I'm doing a little game in OpenGL for college and I've got these 3 classes in C++:
WarBalls - represents the Game's Application. It is supposed to be a singleton and holds all the Game's...
|
by: muby |
last post by:
Hi everybody :)
I'm modifying a C++ code in VC++ 2005
my code snippet
void BandwidthAllocationScheduler::insert(
Message* msg,
BOOL* QueueIsFull,
|
by: dreamy |
last post by:
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 'sum( ) VALUES ()' at line 1
This is my code
<?php
//make...
|
by: icemaster451 |
last post by:
Hello im making a browser game and have 99% working but iv got one error i cant find / fix and would like to know if anyone can help me where im going wrong heres the error
QUERY ERROR: You have an...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |