8,966 Posted Topics

Member Avatar for harikrishna439

MySql does not support computed columns, but you can write an insert/update trigger to fill in the age column of your table.

Member Avatar for urtrivedi
0
94
Member Avatar for klenne

A trigger is something that works at the server side. If you write an update trigger to detect when a reservation is paid (for example setting a paid flag), then it will do what you tell it to. There is no need to call something from your code.

Member Avatar for pritaeas
0
248
Member Avatar for thomasfoster96
Member Avatar for mwenyenia07

I assume your controller is in PHP. PHP has no way to get data from javascript, so you will have to post the javascript value to PHP.

Member Avatar for pritaeas
1
80
Member Avatar for rajeevbu

You want to use this in your own code ? [URL="http://www.tonymarston.net/php-mysql/role-based-access-control.html"]Here[/URL] is a good description of how it can work.

Member Avatar for pritaeas
0
73
Member Avatar for ivan3510
Member Avatar for ivan3510
0
211
Member Avatar for rohoni

[url]http://www.webmaster-talk.com/php-forum/78717-differences-between-php4-and-php5.html[/url]

Member Avatar for rajeevbu
0
520
Member Avatar for cgull

[CODE] !preg_match("@^([0-9]?[0-9])+[-|/|.]+([0-9]?[0-9])+[-|/|.]+(([0-9]{2})|([0-9]{4}))$@i", $from_date, $date_regs) [/CODE] The code is trying to match a date format, but it appears incorrect. [CODE] !preg_match('@^(\d{1,2})[-/\.](\d{1,2})[-/\.](\d{2}|\d{4})$@', $from_date, $date_regs) [/CODE]

Member Avatar for cgull
0
147
Member Avatar for karthik_ppts

Do you mean like [URL="http://php.net/manual/en/function.imagecopymerge.php"]this[/URL] ?

Member Avatar for karthik_ppts
0
111
Member Avatar for saybabs
Member Avatar for pritaeas
0
56
Member Avatar for scarcella

The easiest way would be to contact the author, ask to buy their database. (Although I doubt they want the competition.) Copying from the book sounds like a copyright infringement. Be careful of your steps.

Member Avatar for scarcella
0
182
Member Avatar for genevish

If I open the site in Chrome I also get a warning when visited directly. Your domain may be blacklisted.

Member Avatar for PepperAdmi
0
125
Member Avatar for wrathyimp

You can use CONCAT on the last three columns, if you CAST them to VARCHAR first. You can then CAST it back to a DATE if needed.

Member Avatar for pritaeas
0
176
Member Avatar for pseudorandom21
Member Avatar for reygcalantaol

[CODE] preg_match('@<p><b>(.*?)</b>@i', '<p><b>1,664</b> Referring IP addresses</p>', $matches); print_r($matches); [/CODE]

Member Avatar for reygcalantaol
0
127
Member Avatar for decade

[quote] The mysql extension provides a procedural interface and is intended for use only with MySQL versions older than 4.1.3. This extension can be used with versions of MySQL 4.1.3 or newer, but not all of the latest MySQL server features will be available. Note: If you are using MySQL …

Member Avatar for decade
0
98
Member Avatar for geekme

Are you developing a cloud ?? My guess is you have to develop a cloud application. There are many languages you can use, but your type of application should decide your language. I'm currently using C#. Visual Studio can deploy my application directly to Azure. But there are many more …

Member Avatar for pritaeas
0
123
Member Avatar for itisnot_me

[CODE] {(\w+)(:\w+)+} [/CODE] What do you need to put in an array ? Only the words ? Can't you use [iCODE]explode()[/iCODE] ?

Member Avatar for pritaeas
0
133
Member Avatar for Hani1991
Member Avatar for Pro2000
0
163
Member Avatar for prashanth18

For completeness, there is also Cufon ([url]http://cufon.shoqolate.com/generate/[/url]).

Member Avatar for leakbali
0
271
Member Avatar for vizz

MySql expects [iCODE]'2011-08-12 18:35'[/iCODE] or you can use the MySql function [iCODE]NOW()[/iCODE] in your query.

Member Avatar for pritaeas
0
101
Member Avatar for Paaat

[CODE] $total = mysql_query("SELECT COUNT(*) AS mycount FROM $table_and_query"); $total = mysql_fetch_array($total); echo $total['mycount']; [/CODE]

Member Avatar for Paaat
0
251
Member Avatar for Ender330

[QUOTE=Ender330;1622158]+558499608822 -- I want any number that starts with the country code 55 to be [B]excluded[/B].[/QUOTE] [CODE] preg_match('/\+(?!55)\d+/', $string); [/CODE]

Member Avatar for pritaeas
0
69
Member Avatar for manishbq

Here is an [excellent article](http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/) on the database side of things.

Member Avatar for manishbq
0
149
Member Avatar for MasterGberry

[CODE] $ibforums->skin['_wrapper'] = preg_replace("'index.php\?portal=AOT&act=aom_rec_game&cmd=([a-zA-Z0-9]*)&name=([\[\]a-zA-Z0-9]*)'", "The-Titans/Replay/Command-\\1/Name-\\2.html", $ibforums->skin['_wrapper']); [/CODE]

Member Avatar for pritaeas
0
177
Member Avatar for osm1987
Member Avatar for debasisdas
0
122
Member Avatar for timhysniu

If you have your indexes set and it's still too slow, you may have to look at the way you're extracting data. Perhaps there is a way to trim your resultset and still get what you want. In your case I'd try setting an index to ip_from and ip_to combined

Member Avatar for gypsywitchcraft
0
209
Member Avatar for karthik_ppts

You could create a cookie using Javascript and let PHP check if it is there. The only pitfall is when cookies have been disabled. There is no sure way to do this.

Member Avatar for IIM
0
127
Member Avatar for titusnainggolan
Member Avatar for pritaeas
0
125
Member Avatar for sam023

The URL is too long for the server to handle. Perhaps you can use two separate smaller requests to achieve the same result.

Member Avatar for Jack_M
0
710
Member Avatar for Sorcher

[url]http://dev.mysql.com/doc/refman/5.5/en/insert.html[/url] [CODE] $sql = "INSERT INTO ue-userfile (`id`, `userid`, `albumname`) VALUES ('$imageid', '$userid', '$newalbum')"; [/CODE]

Member Avatar for Sorcher
1
82
Member Avatar for minitauros
Member Avatar for vibhaJ
0
137
Member Avatar for bluetoot
Member Avatar for rkchowdary
Member Avatar for pritaeas
0
258
Member Avatar for devindamenuka

There are a lot of threads on the subject within this forum, but most end up changing the mailing altogether. Changing the PHP.INI to a different mail server is usually not possible, because it does not support authentication (which most smtp servers require).

Member Avatar for devindamenuka
0
115
Member Avatar for desbest

What do you mean, the query fails ? If you replace > with = you won't find any results, because there is no price of 35.00 in your xml. If however you do this: [CODE] $nodes = $xml->xpath(sprintf('/bookstore/book[price = '39.95']', $name)); [/CODE] You get one result.

Member Avatar for pritaeas
0
172
Member Avatar for emmas4impact

Could you perhaps create a screenshot of what you want to achieve ? It looks like you want to create polygons on a google map, as documented [URL="http://code.google.com/apis/maps/documentation/javascript/overlays.html#Polygons"]here[/URL].

Member Avatar for emmas4impact
0
975
Member Avatar for weeon
Member Avatar for weeon
0
112
Member Avatar for mwenyenia07
Member Avatar for whitefly
Member Avatar for whitefly
0
150
Member Avatar for sfrederick1

Personally, I'd prefer using SimpleXml (or one of the others) to easily extract the information I want from the returned xml feed.

Member Avatar for atrueresistance
1
235
Member Avatar for elibyy

This is not HTML, but a template that gets parsed. What do you want to achieve ? See [URL="http://www.daniweb.com/web-development/php/threads/336394"]this thread[/URL] for example.

Member Avatar for elibyy
0
253
Member Avatar for Isti666
Member Avatar for leakbali
0
106
Member Avatar for phaedrusGhost

Old: [CODE] $sqlC = " SELECT * FROM table_comments AS c, table_blogs AS b WHERE c.id_blog = b.id_blog AND c.id_blog = '$blogView'"; [/CODE] New: [CODE] $sqlC = " SELECT * FROM table_comments AS c JOIN table_blogs AS b ON c.id_blog = b.id_blog WHERE c.id_blog = '$blogView'"; [/CODE]

Member Avatar for leakbali
0
146
Member Avatar for ranj_s20

Can you please explain with your table definition and a small example what it is that you want to achieve ?

Member Avatar for Netcode
0
83
Member Avatar for jacksantho
Member Avatar for sha1023012
Member Avatar for utthu

This is very vague. Please explain what you want. Note that PHP runs only server-side.

Member Avatar for pritaeas
0
44
Member Avatar for Hummdis

Can you please give an input and output example of what you are trying to achieve ? That may make it easier for us to come up with a solution.

Member Avatar for Hummdis
0
247
Member Avatar for jorjah

The End.