I am trying to update some legacy php code via some sed substitutions running in a bash script.
Some items seem to work fine; others not so much. The issue appears to be when the substitution strings contain single or double quotes.
I have tried a variety of means of escaping the quotes; but...
I am updating legacy php code which imports csv data to a mySQL database. The code includes error checking which compares the number of imported rows to the number of lines found in the import file. The problem is that a small percentage of records includes returns or line feeds enclosed within...
I have a form within a modal which sends an email...
While it works in Bootstrap 3, in v4 I get a javascript console error:
Uncaught TypeError: $.ajax is not a function
Any help on resolving appreciated very much.
TIA,
-allen_m
The function:
<script>
function submitContactForm(){
var reg...
I have a query which matches records with similar 7 and 6 digit primary keys...
I wish to delete the matching 7 digit records only...
The query below returns: '#1242 - Subquery returns more than 1 row'
I know I could write a loop in PHP to accomplish this; but, would like to write a proper...
From a table of sales records, I need to select the most recent transactions by customer where the sum of those transactions is greater than $500; BUT, only enough records to meet the minimum sum requirement- not all of them.
So if a customer spent $150 once a month for the last year, I want to...
It is an odd request to be sure... The explanation is that the individual records represent target households for marketing and the cust_id represents the "source" of each target record. The need to spread them out as described arised from budgetary constraints. When the marketing list is...
I'll do my best to describe what I need; hopefully, my description is clear.
I have a table containing a group of records with 2 fields upon which i need to sort.
record_no (integer and primary key)
and
cust_id (varchar - data set contains duplicates)
In a nutshell I need a result sorted such...
mysqld --skip-grant-tables --skip-networking doesn't seem to work with MySQL 5.75 and doubt it's available w- MAMP. Will probably try to re-install. I need 5.75 for the new GIS functions...
Thanks for sudo find suggestion...
Found it at /private/var/root/.mysql_secret but password isn't being accepted for user 'root'@'localhost' (using password: YES)
Re ran mysql_install_db to re-create the data dir and a new random password and it still isn't being accepted...
Not sure what...
I installed MySQL 5.75 on OSX 10.10 and it is up and running successfully; but, following execution of mysql_install_db I can not locate .mysql_secret anywhere... I double checked the home env variable to make sure as well as searched via spotlight etc... It simpley does not seem to exist; but...
I am using SimpleXMLElement()to parse the body of an email for XML data and am having difficulty parsing fields with 'parts' defined; such as:
<name part="first">First</name>
<name part="last">Last</name>
$array->prospect->customer->contact->name yields the first name; but I can't resolve...
That seems to be the clue I needed!
Should be able to resolve from here... Thank you.
Array
(
[818] => Array
(
[salesman] => 818
[0] => DAVID QUINTERO
[salesman_name] => DAVID QUINTERO
[1] =>
[quan] =>
)
)
Other keys fail to return valid result as well...
Array IS created from MySQL query as follows:
WHILE( $row = mysql_fetch_array($result)) {
// make array
$id = array_shift($row); // Shifts first element...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.