I have installed Xampp with a CodeIgniter installation. I want to connect from CodeIgniter to a SQL database. I changed the database config file and set the dbdriver to sqlsrv. $active_group = ‘…
Upload image to server and store path with text values into MySQL
I am still a beginner of Andorid programming and would need some help to the following: What I currently have are 2 codes, which the first uploads an image to the server and stores the path into a …
Data type mismatch on SQL Query in VBA
I am trying to do an SQL query in VBA to retun a specific case number. Whenever I execute the query, it returns an error of “Data Type Mismatch in Criteria Expression”. I am passing the query an integer to use to query an autonumber primary key. Of course the debug hilights the execute command. An…
MS Outlook VB Programming
Hi im getting a incorrect syntax error when I run the following code in outlook 2010 VB Editor it appears to be happening where ive concatenated & myNamespace.CurrentUser & ” Following is …
Magento joining 2 tables
I want to join admin table and another profile table in magento how should I do this? I want to join $userModel = Mage::getModel(‘admin/user’); table and Answer Riaz.try the below code — Here suppose vendorprofile.vendor_id = main_table.entity_id is the relation between two tables. if you wa…
SQL Query – Incorrect syntax near the keyword ‘LIKE’
The following query is giving an error at ‘CASE WHEN NOT LIKE’ (Msg 156, Level 15, State 1, Line 14 Incorrect syntax near the keyword ‘LIKE’) SELECT TimeStamp, TimeStampNS, ISNULL(TagName, ‘…
Trigger for checking a given value before INSERT or UPDATE on PostgreSQL
I have to create a trigger to update a database where there are products. Products have an expiration date and before inserting or updating a product I must check if the expirationDate is superior to the current timestamp. If it is I must do the insert/update regularly (this is what I have problems with). If …
Query for array elements inside JSON type
I’m trying to test out the json type in PostgreSQL 9.3. I have a json column called data in a table called reports. The JSON looks something like this: { “objects”: [ {“src”:”foo.png”}, {“…
Compare two time strings in SQL
I have a string variable that denotes a time: I need to check if the current time getdate() is after or before @time. How can I do this in SQL? Answer This should do it: SQL 2008+ Earlier:
How to use date variable in sql developer’s “Enter Binds” dialog?
I am trying to run a query from sql developer and query has variables (:var). I am having problem with the date variables. I used all the possible combinations to format date using to_date() function….