Tag: php

WordPress MSSQL Installation

I have read all over the place how WordPress is only capable of working on MySQL, which I have no problem with, however where I work we are on MSSQL, and MSSQL alone. I read here: http://core.trac.wordpress.org/ticket/10918 That there was at one point some stuff added to the code to potentially allow MSSQL functionality, I […]

How resolve this Error Loading ModulesMySQL server has gone away for large joomla database website

I have developed a joomla website with a large database expecially the jos_users which is having about 2 million users.. I get this below error when i try to create a New contact in the backennd of joomla admin (contact component) I have dedicated server and have told me host providers to see if there […]

MSSQL connection using PHP

Iam so fresh with PHP so this problem so big to me. I dont know why and where my mistake is. Based on my research to connect to MSSQL database by using this code: <?php $run = mssql_connect(‘dev-svr05′,’sa’,’P@55w0rd’, ‘orlig_sm_dev’); if ($run) { echo “Connection OK”; } else { echo “Connection Failed”; } ?> But when […]

How can I run grocery with sql server?

I have grocery crud with codeigniter running in xampp with php 5.6.8. I made codeigniter connect with sqlsrv but when i open the crud i receive: Error Number: 42000/156 [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword ‘FROM’. SHOW COLUMNS FROM `PERSONA_TEST` Filename: D:/Trabajo/xampp/htdocs/creditos/crud/application/models/grocery_crud_model.php Line Number: 431 What i know: I have a […]

PHP PDO Connection to Azure SQL – Invalid Object Name

A client has set up an SQL database on the Azure cloud. I am trying to use PDO to connect, but as soon as I try to access a table’s data, I get an error message. My code to connect: try { $db = new PDO(‘sqlsrv:server=tcp:serverid.database.windows.net,1433;Database=testdb’,’user’,’pass’); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (Exception $e) { echo “Error […]

How to prevent duplicate record inserts with PDO

I want to try to setup something where if user already submitted a dept key and current date it will stop the record from being inserted. It will give out an error saying duplicate record entered try again. Here is part of my insert page but it is not working $stmt= $db->prepare(“INSERT INTO tbl_lighting(Department, areaCode, […]

Foreach loop declare variable on select table array

This question already has an answer here: PHP Parse/Syntax Errors; and How to solve them? 11 answers

Zend Framework 2, PDO dblib driver, how to change SQL Platform Decorator

It seems that ZF2 with the PDO:dblib driver defaults to using the SQL92 SQL decorator. How do I use the DI system to tell it to use the SqlServer decorator instead? Just can’t get my head around it. The issue is that the paginator attempts to use LIMIT/OFFSET syntax which doesn’t work in SQL Server. […]

how i can access local web or database server remotely without static IP

how i can access my local web server or database server access remotely without static ip address, i have desktop database driven app which is saving data in MS SQL server i want to access data on company current site hosted on bluehost, is there any way to access following points MS SQL server remote […]

Getting PK of updated records in cakephp/sql server

I have used bulk update to sync datas between two tables as below $sqlProc=” UPDATE cards SET cards.card_no = t2.card_number, cards.expiry_date=t2.expiry_date OUTPUT INSERTED.Id AS ‘updated_id’ FROM cards INNER JOIN card_temp t2 ON (cards.account_no = t2.account_number AND cards.customer_name=t2.customer_name) WHERE cards.is_disabled=’N'”; debug($this->Request->query($sqlProc)); Above query will also return Primary key of updated records usingOUTPUT INSERTED.Id AS ‘updated_id’ in […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.