802 Posted Topics

Member Avatar for 54uydf
Member Avatar for 54uydf
0
127
Member Avatar for FlowerPower1

Take a beginner's course in PHP/MySQL. There are plenty out there.

Member Avatar for debasisdas
0
96
Member Avatar for vijaygupta

You'll have to subscribe to a professional market data service to get quotes without delays. I've searched extensively and not found a single free source.

Member Avatar for smantscheff
0
107
Member Avatar for 54uydf

All reserved keywords of mysql are derived from english words. Therefore you are better off not using english words for table and column names to avoid conflicts. Make sure that all components involved - database, tables, columns, server, clients etc. - use an appropriate character set, presumably utf8. Check the …

Member Avatar for smantscheff
0
126
Member Avatar for navdeep7489

Assuming that you use an Apache server, the best you can do for increased capacity is to increase the RAM.

Member Avatar for chrishea
0
114
Member Avatar for tinymark

What is your aim? If you want to convert some old flat file to MySQL without disturbing much of your application, just export it to CSV and import it into the new table. If you want to have a clean relational setup, go by the book: eliminate functional dependencies in …

Member Avatar for tinymark
0
181
Member Avatar for mrhankey

How do you match existing client entries with existing folders? If all folders have the same name, you can do it like that (basically an inverted left join): [CODE]insert into folders (foldername, client_id) select 'ClientDocs', client_id from clients where not (client_id in (select client_id from clients,folders where clients.client_id=folders.client_id)) [/CODE]

Member Avatar for tinymark
0
129
Member Avatar for OldDeveloper01

[CODE]if (mysql_num_rows($sql>0));{ [/CODE]should read [CODE]if (mysql_num_rows($sql)>0);{[/CODE]

Member Avatar for tomato.pgn
0
273
Member Avatar for Buppy

You can do it all in one query and put the display logic into your program code. Make sure that the fields on which the tables are linked are indexed. Also make sure that you select only the needed fields. [CODE]select t1.a,t1.b, t2.c,t2.d, t3.e, t3.f from tbl_level1_p t1, tbl_level2_p t2, …

Member Avatar for tinymark
0
106
Member Avatar for tape enterprise

I don't understand the problem. You know how you can get column names using mysql_field_name(). You also know how to get the field content using mysql_result. Put both together to create any array you want. For example (not tested): [CODE]for ($i = 0; $i < mysql_num_fields($result); $i++) $columnNames[] = mysql_field_name($result, …

Member Avatar for tape enterprise
0
112
Member Avatar for jfunchio

Without looking to deeply into this, first fix the condition [CODE] grade = 'F' or null [/CODE]It should read [CODE] grade = 'F' or[COLOR="Red"] grade is [/COLOR]null [/CODE]

Member Avatar for smantscheff
0
98
Member Avatar for ptara1

What do you mean with "partially upload"? Does part of them get into the database? Show the receiving script and the CREATE TABLE statements for the images table.

Member Avatar for TechySafi
0
271
Member Avatar for ppohlmann

[CODE]select city, sum(rewards) from user, rewards where city.userid=rewards.userid group by city; [/CODE] They call it a join. Read about it, you need it everywhere in databases.

Member Avatar for ppohlmann
0
108
Member Avatar for cjay175

Is this a question of speed, readability, maintainability or what? You can do it either way as long as you are happy with it. There is no standard way because your database design is flawed. Since placements for the same url are unique (you cannot have sideadmiddle more than once …

Member Avatar for metalix
0
5K
Member Avatar for andrewliu

It is not clear which part you want eventually to match. Do you want to replace css classes? The first three preg_match statements are better put in one single statement to clarify the code. But first tell us which part you want to have extracted.

Member Avatar for andrewliu
0
183
Member Avatar for hxmelvin
Member Avatar for pitic

Precede p_id by the table and the database name: [CODE]where db1.t1.p_id=db2.t2.p_id and db1.t1.p_id=db3.t3.p_id[/CODE]

Member Avatar for pitic
0
416
Member Avatar for rajandass65

You can use the group_concat() function: [CODE]SELECT code, COUNT( code ), group_concat(data) AS no_of_times FROM testing_table GROUP BY code ORDER BY code [/CODE]

Member Avatar for smantscheff
0
67
Member Avatar for jacob21

Is date a character or a date field? In the latter case you could use a query like [CODE]select * from mytable sort by date desc;[/CODE] In the former case you have to convert the date field with an inline function.

Member Avatar for swpou
0
135
Member Avatar for igor221189
Member Avatar for gazzy1
Member Avatar for andrewliu

Regular expressions do not work recursively. To match arbitrarily deeply nested div tags you would need such an recursion. You could use a regex for this special case like this: [CODE] preg_match_all('~<div class='name'>\s*(<div.*?</div>\s*)?(.*?)</div>~is', $res, $matches );[/CODE]

Member Avatar for andrewliu
0
9K
Member Avatar for gazzy1

For god's sake, where is the problem? (Did you notice that this here is a PHP forum, not for JavaScript? And did you notice that you are not only allowed, but supposed to use code tags?)

Member Avatar for peter_budo
0
116
Member Avatar for atfOnly

You sure have a unique id field in the modul table which you could use to form an anchor, like in [ICODE]<a href="#tabs-$result['id']">$result['nama_modul']</a>[/ICODE] Apart from that, the php code tags are missing in line 9.

Member Avatar for smantscheff
0
98
Member Avatar for Giggaman

Where is the problem? You dynamic PHP page displays the database content. When the user submits new stats, store it to the database first place in your script. Then load the data from the database and display the current database content - including the newly submitted data - in the …

Member Avatar for Giggaman
0
168
Member Avatar for jlego

You have the customer_id. This is link enough. You can select all repairs for one customer using the customer id, and for formatting purposes you can use the group_concat() function, like in [CODE]select group_concat(repair_id) from repairs where customer_id=$fixed_value; [/CODE]

Member Avatar for smantscheff
0
141
Member Avatar for Sahilsahni

Find a free or paid SMS service. They will have usually HTTP GET interfaces so that you can build a HTTP query string which contains your user's phonenumber and payload.

Member Avatar for smantscheff
0
122
Member Avatar for itisnot_me

Compare the filetimes, then format the one you want to have. [CODE]$format = 'm/d/Y H:i:s'; if ($t1 = filemtime('page1.php') < ($t2 = filemtime('page2.php')) $filetime = date( $format, $t2 ); else $filetime = date( $format, $t1 ); [/CODE]

Member Avatar for itisnot_me
0
146
Member Avatar for gunnarflax

It is a question of code efficiency. You use functions 1) to avoid code repetitions and 2) to make the semantics clearer. If the function is only called one during initialization and you will not use the result at another place, don't store it in a property. If on the …

Member Avatar for gunnarflax
0
161
Member Avatar for andrewliu

Extract the content you want using regular expressions and store it in a (MySQL) database. You can do that with PHP or any other language with a regular expression module.

Member Avatar for smantscheff
0
65
Member Avatar for lttleastig
Member Avatar for mrblippy

[CODE]SELECT CustomerName FROM Customer WHERE NOT (Customer.CustomerCode in (SELECT c.CustomerCode FROM Customer c, Movie m, Video v WHERE c.CustomerCode = v.CustomerSoldTo AND m.MovieCode = v.MovieCode AND m.Rating = 'R' ))[/CODE]

Member Avatar for smantscheff
0
107
Member Avatar for fabzster

You can include aggregate functions for the stores in you Group subquery. [CODE]SELECT tblpolicies.PolicyNumber , tblpolicies.StoreId , tblpolicies.ConsultantFullName , tblpolicies.DateReceived , tblpolicies.ClientFullName , tblpolicies.Comment , tblpolicies.Query , tblpolicies.PolicyStatus , tblpolicies.DateModified , Groups.GroupName , Groups.StoreName , Groups.StoreTarget , Groups.StoreManager , Groups.PortfolioName , Groups.StoreStatus , Groups.RepName , Groups.ProvinceName [COLOR="Red"] , Groups.NumberOfPolicies [/COLOR] …

Member Avatar for fabzster
0
207
Member Avatar for kirtan_thakkar

You can check the HTTP_POST_FILES array for the actual file size and gracefully reject larger files. There is also a PHP setting max_upload_size which can limit the upload size with a maybe not so user-friendly error message. The uploaded file can be converted with the GD image library. Or install …

Member Avatar for Gewalop
0
170
Member Avatar for petrakid

I cannot resist ardav's challenge for a 2-liner. This is not a 2-liner, but at least it has 2 lines less than ardav's solution (which is a fine start to begin with). Just add 4 weeks to your start date. If this does not bring you into the next month, …

Member Avatar for petrakid
0
341
Member Avatar for mgranger96

What does $View contain in your query? In these lines the replacement [ICODE]', '[/ICODE] by [ICODE]','[/ICODE] can never occur because all blanks have already been replaced before. [CODE]$replace_what = array(' ', ' - ', ' ', ', ', ','); $replace_with = array(' ', '-', '_', ',', '-');[/CODE]

Member Avatar for mgranger96
0
228
Member Avatar for raghujosh

If you are using PHP, you can use exactly the same DDL statements as from the command line. So, yes, you can dynamically create and alter tables.

Member Avatar for smantscheff
0
1K
Member Avatar for ctpsolo

You got your quotes wrong. Change [CODE] $query = "SELECT * FROM players WHERE UID='$uid'; [/CODE]to [CODE] $query = "SELECT * FROM players WHERE UID='$uid'";[/CODE] And use a decent editor with syntax highlighting. I recommend EditPad++.

Member Avatar for ctpsolo
0
451
Member Avatar for Fresco Vivir

Start with a clean database design which does not contain structural duplicates. You do not need one table for each quiz, but one table each for quizzes, questions, answers, users, users_and_answers. First do all your database work and see if you store and retrieve all necessary info. Then move on …

Member Avatar for smantscheff
0
203
Member Avatar for lkrvk
Member Avatar for tape enterprise

Use array_merge(). [CODE]$variable3 = array_merge( $variable1, $variable2 ); [/CODE] And check your code style. With your kind of ungrammatical writing and spelling you will spend more time debugging than coding.

Member Avatar for smantscheff
0
73
Member Avatar for jfunchio
Member Avatar for smantscheff
0
65
Member Avatar for phpDave
Member Avatar for phpDave
0
94
Member Avatar for niket_voldy

So what? In which ecospace is this problem at home? Do you want to solve it interactively, or in a trigger, or in PHP script, or by means of smoke signals?

Member Avatar for smantscheff
0
81
Member Avatar for chamukwaga

You can protect the phpmyadmin directory with an .htaccess containing the statements AuthType Basic AuthName "Restricted Files" AuthUserFile path/to/your/password/file Require user /your/username Have a look: [url]http://httpd.apache.org/docs/2.0/howto/auth.html[/url] In the phpmyadmin is an index.php file to which the empty request / defaults.

Member Avatar for smantscheff
0
94
Member Avatar for jacob21

My first suggestion is that you explain your problem. What do you want?

Member Avatar for smantscheff
0
45
Member Avatar for manish250
Member Avatar for jacob21
Member Avatar for ifezuec

Use backticks for column names instead of apostrophes (or omit them if your column names don't contain blanks), but use apostrophes around the field content. Do not use a semicolon inside the statement if you submit it using PHP. [CODE]$sql = "INSERT INTO `comments` (user ,pass,comment) VALUES ('$user', '$pass', '$comment')";[/CODE]

Member Avatar for smantscheff
0
111
Member Avatar for styleest

If you were my fellow programmer you would use code tags for better readability. And you would boil down your code to the problem without having us to spell our way through lots of irrelevant HTML. Be a good fellow and try again.

Member Avatar for EvolutionFallen
-1
154

The End.