I have the following code:
function query_tip($title,$desc)
{
$q1=("SELECT id, company, name FROM abc
where ('$title' LIKE CONCAT('% ',company,' %') or
'$desc' LIKE CONCAT('% ',company,' %') or
'$title' LIKE CONCAT('% ',name,' %') or
'$desc' LIKE CONCAT('% ',name,'...
We have a client whose site is hosted on a server (I don't want to disclose hosting company name) which does not provide DB functionality.
We have developed a very simple CMS based site but out implementation uses MySQL.
I read somewhere that there are DB like functionality built-in in PHP. I have never used them.
What are these and ...
I'm looking to convert this line of code to PHP's mktime():
Calendar timeStartPoint = Calendar.getInstance();
timeStartPoint.set(11, 0);
timeStartPoint.set(12, 0);
timeStartPoint.set(13, 0);
timeStartPoint.set(14, 0);
timeStartPoint.set(5, monthStartPoint ? 1 : 5);
timeStartPoint.set(2, 0);
timeStartPoint.set(1, 2004);
I imagine 1 is...
Let's say I have a list of domain names that I would like to analyze. Unless the domain name is hyphenated, I don't see a particularly easy way to "extract" the keywords used in the domain. Yet I see it done on sites such as DomainTools.com, Estibot.com, etc. For example:
ilikecheese.com becomes "i like cheese"
sanfranciscohotels.com be...
Can someone provide a demo here?
And how to retrieve the matching snippet at the same time?
...
I am using magento and creating a product finder. Is there a way I can link to a configurable item example: mystore.com/bedding-sheets
lets say I want to send a friend a link to the sheet that is 250*250cm i would think the link was maybe: mystore.com/bedding-sheets?attribute496=1 (except this is not the case)
<dl class="last">
<dt...
I have page which is redirected from htaccess.
now I can pass the German characters as params
like
site.com/maörx/idasd
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z0-9äÄöÖüÜéß\-]*)/?$ page.php?var=$1 [L]
it is working in the localhost . but not on the server....
server i am getting the same old issue(Error 404:Obj...
So, I want to sell my PHP application on envato marketplace. But, I don't know what free/open-source charting library (PHP / Flash based) that allow me to incorporate it in such product?
...
Hi
Does anyone know how to integrate a one time fee into paypal?
The user clicks SignUp then is taken to a page to confirm t&c's and where they pay £50, they are then - if successful, taken to a page where they can enter details and create an account... but i only want this page to be visible to users coming from paypal...
I thought abo...
echo timezone_name_from_abbr("", 3600*7, 0); //ok
echo timezone_name_from_abbr("", 3600*8, 0); //NOT ok! return nothing!
echo timezone_name_from_abbr("", 3600*9, 0); //ok
...
Hi all,
I have a list of "online users", which I refresh every 30 seconds with Ajax.PeriodicalUpdater from prototype.js.
There is an issue, that if a user has two tabs/windows open with the site, logs out in one of them, the PeriodicalUpdater is not canceled.
This means that PeriodicalUpdater updates my block element with the entire l...
Hi,
I'm Using ZendFramework-1.0.4 and I don't have any idea how does it wrap the $_FILE global-variable.
Is it a good idea to use it directly in my Controller?
Bcus I need to Upload an image file.
...
Hi, trying to duplicate some PHP code in C#. The PHP code uses the uniqid function with the more entropy parameter set to true. Any idea of how to best duplicate this in C#?
http://us2.php.net/uniqid
...
I need to know how to implement URL Routing in PHP. Im a Amateur PHP Developer. Guide me. Any Help would be greatly appreciated
...
Hello All,
I have my PHP scripts running on the WAMP server.
Here's what i am doing
PHP script A that queries the database and gets a set of rows (I have set the set_time_limit (0) // unlimited time for the script to execute )
Based on the result set I execute a tcl script for each row of the result set
The TCL script takes about a...
This is my table:
CREATE TABLE IF NOT EXISTS `Category` (
`Name` varchar(25) NOT NULL,
`lft` INT UNSIGNED NOT NULL,
`rgt` INT UNSIGNED NOT NULL,
`CategoryId` int UNSIGNED auto_increment NOT NULL,
PRIMARY KEY (`CategoryId`)
) Engine = InnoDb;
I have a url that looks like this:
products.php?category=5
From the category id I need to re...
Given a leaf, and its parent TD, do a print:
$parent = new Node('td');
$child = new Leaf('Text:', 'Value');
$parent->add($child);
$parent->print();
print requirement:
sometimes <td>Text: Value</td>
sometimes <td>Text:</td><td>Value</td>
So far i constructed 3 solutions, but none satisfied me, i wonder which one is more OO? And is ...
//matches[0] holds some preg_match'ed values
for($i=0;$i<count($matches[0]);$i++)
{
$price = $matches[0][$i]; //a**uto type casting to (float) returns 0 for $price. Tried it for values greater than 1 too.**
//echo gettype($price);
$price = $price + 0.01; **//Returns 0 + 0.01 instead of the right answer**
//**even after remov...
Below is a small snippet from a code I saw with jquery and PHP.
Notice the PHP part on line 5, I generally put my javascript into separate files so how would I be able to keep my JS in separate files but still use PHP when needed like below?
//when the DOM is ready
$(document).ready(function(){
//settings on top
var domai...
I have at least 4 tables in MySQL for my PHP application (shortened it for this example)
Agents
- Agent_ID
- Agent_Name
Country
- Country_ID
- Country_Name
Job
- Job_ID
- Job_Type
Line_Items
- Line_ID
- Agent_ID
- Country_ID
- Job_ID
Now, I need to select from Line_Items where Agent_ID = 1, and instead of echo-ing the Agent_ID, Coun...