i was just wondering what could be the problem with a working code yet displays an error message such as this:
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: database/DB_active_rec.php
Line Number: 1407
im trying to update fields in my database. I have this code and every tutorial are just the same for batch upload. It works anyway but the thing is it display such an error.
this what i have in my model:
function update2($data){
$this->db->update_batch('users',$data, "id");
}
This what i have in my controller:
public function updateValues(){
$this->load->model('get_db');
$newRow = array(
array(
'id' => '3',
'firstname' => 'Rapphie'
),
array(
'id' => '2',
'firstname' => 'Charmie'
)
);
$this->get_db->update2($newRow);
echo "it has been updated";
}
please help.
I'd like to map my Users to root - so '/:id'. I do the following now
map.connect ':id', :controller = 'users', :action = 'show'
... but I'd also like the links that are generated by Rails to have this format. Can I do a map.resources ... :as = :root or something similar?
Is there any good tool or tool-chain that allows UML images in the .svg format to be created from a textual source file?
The reason for this question is that I want to automate the generation of these images to avoid having to manually create and update this set of images.
i have created http seesion, using the same http session, i would like to do some get and set operations.
Note : What ever the operation, data is present in XML Format, giving xml file as input. And need to fetch the status.
Is it possible using TCL curl.
HI
when an object (having sub objects) is serialized using a BinaryFormatter, what exactly happens? how the object data is stored? how the strings used to map the objects store? I want to know the serialized stream format.
please help me ..
I'm making an AJAX call in my symfony project, so it has an sf_format of 'js'. In the actionSuccess.js.php view, I call get_partial to update the content on the page. By default it looks for the partial in 'js' format since the sf_format is still set as 'js'. Is it possible to override the sf_format so that it uses the regular 'html' partial that I already have (so that I don't have to have two identical partials)?
Hi,
I need a C# function that takes 2 strings as an input and return an array of all possible combinations of strings.
private string[] FunctionName (string string1, string string2)
{
//code
}
The strings input will be in the following format:
String1 eg - basement
String2 eg - **a*f**a
Now what I need is all combinations of possible strings using the characters in String2 (ignoring the * symbols), and keeping them in the same character position.
Eg: baaement, baaefent, baaefena, basefent, basemena, etc
any help? :)
I need to get a list of tags in a text, make their contents bold, and remove them. Can't figure out how to make it.
E.g. with the following input:
foo [b]bar[/b]
The result should be:
foo bar
I use the following code to extract the tags:
Dim matches = Regex.Matches(OriginalRich.Text, String.Format("(\[{0}\])(.*?)(\[/{0}\])", tag), RegexOptions.IgnoreCase Or RegexOptions.Compiled)
Any help would be appreciated.
Hello all!
I was thinking if there such a function for c language.
I have a char array with data from a text file and i need to convert it to hexadecimal format.
Thank you in advance!
I was doing some type conversion routines last night for a system I am working on. One of the conversions involves turning string values into their DateTime equivalents.
While doing this, I noticed that the Convert.ToDateTime() method had an overload which accepted a boolean parameter.
First question? Under what circumstances could this ever be useful?
I went a little further and tried to execute the method in QuickWatch. Either way ( true or false ), the routine returns an InvalidCastException.
Second question? Why is this method even here?
I want to create a listing view in which the record will be in this format(basically one record based on other, what approach i should follow) .
My table
Module1
Module1Feature
Module1Feaure2
Module1Feature3
Module2
Module2Feature
Module2Feature2
Module2Feature3
Basically Please Notice that the child records are based on the parent.
I would lean towards
if (object == nil)
but I've noticed in some tutorials the use of
if (nil == object)
Is this just a style thing, or is there some justified rationale for using either format?
Hello everyone,
I was wondering how I can format the textField that I'm using for a phone number (ie like the "Add New Contact" page on the iPhone. When I enter in a new mobile phone, ex. 1236890987 it formats it as (123) 689-0987.)
I already have the keyboard set as the number pad.
Thanks!
I've got two branches that are fully merged together.
However, after the merge is done, I realise that one file has been messed up by the merge (someone else did an auto-format, gah), and it would just be easier to change to the new version in the other branch, and then re-insert my one line change after bringing it over into my branch.
So what's the easiest way in git to do this?
Hello All,
I'm exporting some data to PDF. The data contains one or more bitmaps.
Unfortunately I'm getting the following error during the export.
Sorry, Parameter is not valid.
Source: at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Image original, Int32 width, Int32 height)
Type: System.ArgumentException
Any help will be highly appreciable.
Regards,
Maruthi Kumar
I would like to parse this Gstring with groovy :
Format type : CodeClass, Name, Accession, Count.
def txt = """ <Lane_Attributes>
ID,1
FovCount,600
FovCounted,598
...
</Lane_Attributes> """
And get a map like :
Map = [ID:1, FovCount:600, FovCounted:598]
How can I :
- extract text between tag and ?,
- and convert to a map ?
My Windows application GUI is accepting some required application configuration fields from the user. I need to store them of course, but I wanna hide these fields from the user.
I cannot use database to store these configs.
I want to avoid using app.config either. (No app.config encryption)
Any suggestions, Where and in which format i should store fields. (Field example is: Accepting database User credentials, Task Schedule info etc.)
Hi I have a table that looks like this
id : productid : featureid
and would have the following data:
(1, 1, 16)
(2, 1, 21)
(3, 1, 25)
(4, 2, 16)
(5, 2, 21)
(6, 2, 27)
where featureid is a foreign key to another table.
I need to select products that have both featureids of 16 and 25, in which case productid 1 but not productid 2
Can someone show me an example of how to format this query.
how can we extract system time in vb and do calculation ie. adding or subtracing time then store change time in oracle database table in earlier format .
I have this: 2010-04-08T01:01:00Z
I want to remove the 'T' and everything behind it as well.
Also I would like to rewrite the date into this format: 08-04-2010
How can I do this the easiest way?
Thanks