Yeah I know, this is simple High School stuff, but I must have skipped that day.
$unit_cost = "45.00";
$selling_price = "52.45";
$the_markup = ???; // Need percentage of markup here
Embarrassingly thankful for any help.
The Problem:
I am retrieving a timestamp field from a mySQL database running on Apache. I am trying to take this timestamp, and within PHP convert it to something actally readable.
The record is being returned as follows:
mysql> select last_updated from hours where project_id =2...
This simple example does not work:
function getProjectInfo($projectId){
global $row;
// Retrieve info for supplied project ID
// Returns $row
$page_sql = "SELECT * from myTable";
$result = mysql_query($page_sql);
$row = mysql_fetch_array($result);
return $row;
}...
I suppose a picture is worth a 1000 words:
I know I have to user arrays somehow on each row, most likely by adding the project_id ( the primary key ) somewhere in the array.
Could someone post a simple example on how to approach my problem? I am getting lost in this for each stuff.
Thanks.
Ok, I am working on a bit of code to drag and drop a layer. I used the drag / drop library from http://www.walterzorn.com and it works great.
But I need a "SNAP BACK" feature. So I wrote it and incorporated it and it works fine.
Now I need to detect whether my dragLayer hit the dropLayer...
I am trying to figure out which column the query was qualified on.
For instance:
SELECT *
FROM products
WHERE product_id LIKE '%somethingHere%'
OR product_description LIKE '%somethingHere%'
And what I want to know is, which column qualified the query. Was it product_id, or...
Ok I will give you a hint here...
I will be generating a URL to redirect to. And the URL is based on this algo:
<script language="javascript" type="text/javascript">
function StrRotate(aString){
var _l1 = aString;
_l1.substr(_l1.length - 1) + _l1.substr(0, _l1.length - 1)...
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.