802 Posted Topics

Member Avatar for Fulladder

You need 1 table for all the teams (id_team, nationality, id_group) 1 table for the matches between teams (id_team_1, id_team_2, result), various views for quarter to final matches depending on the match results of the group matches

Member Avatar for smantscheff
0
388
Member Avatar for ppetree

I do not understand your select formula, but it seems to me that you have to introduce a zone function by which you can GROUP users BY zones and then select only the first (or n-th) user from each group. So the question is: What exactly is a zone?

Member Avatar for ppetree
0
171
Member Avatar for ZER09

[QUOTE] Host localhost is not allowed something like than[/QUOTE] It pays to read error messages a little more closely than "something like that". What does it say exactly? Probably 'user@localhost is not permitted' or [I]something like that[/I]. Try to connect with the mysql command line program and [ICODE] mysql -uroot[/ICODE] …

Member Avatar for smantscheff
0
162
Member Avatar for shyam2011

If this is a recurring task, you should use triggers or (with MariaSQL) virtual columns.

Member Avatar for smantscheff
0
1K
Member Avatar for warish87
Member Avatar for smantscheff
0
74
Member Avatar for mrcniceguy

I strongly support Sorcher's advice. Don't use a framework until you have hand-coded it all at least once yourself. Then move on to facilitate the job with a framework. Otherwise you will never know what you are actually doing.

Member Avatar for broswilli
0
2K
Member Avatar for vedro-compota

Erase all back-ticks. `OWNER.OWNER_ID` is interpreted as a field name, not as a table- plus field name. Or code `OWNER`.`OWNER_ID` (urrhg)

Member Avatar for vedro-compota
0
133
Member Avatar for kordellas

Your queries look fine, and I don't know any query generator which would render them better or more compact or readable. I only wonder why in your last query you use a left join instead of an inner join.

Member Avatar for smantscheff
0
334
Member Avatar for tatarao25

Look up group_concat: [ICODE]select group_concat(id) from <yourtablenamehere> group by ''[/ICODE]

Member Avatar for tatarao25
0
123
Member Avatar for ZER09

What is the exact error message? Also, omit the spaces between parameter flags and the parameters: [ICODE]mysqldump -uroot -ppass**** coke_pos > testbc.sql [/ICODE]

Member Avatar for smantscheff
0
168
Member Avatar for thijscream

Your query looks fine. What's the problem with it? [If this answer is of any help, please send article 2 to my address.]

Member Avatar for smantscheff
0
197
Member Avatar for princevaliant

In short: don't. Hire a programmer for the job who will achieve in days what you will likely spend months with. If you still want to do it yourself, get some working knowledge of Apache/PHP/Mysql.

Member Avatar for smantscheff
0
147
Member Avatar for netdev11

No. If an employee belongs to exactly one department, there must be no reference to the organization in the employee record but only to the department.

Member Avatar for smantscheff
0
109
Member Avatar for extemer

These are not database terms related to MySQL. Ask your teacher to explain what he meant. Maybe a table with a field for headers and a field for sub-headers. Or two tables in a 1:n relation.

Member Avatar for smantscheff
0
80
Member Avatar for ppetree

MySQL does not have a regex replacement function. Either you code an internal routine, or you use an external tool capable of regex replacements. I would use PHP and the preg_replace function, or export the whole database to a text editor like EditPad and replace it there, or - if …

Member Avatar for smantscheff
0
121
Member Avatar for sagive

You have to provide indexes to the array variables in your form, and on the receiving side you have to walk through the arrays which those indexes constitute. For example: [CODE]echo "<div class='kywrdformcontnr'><div class='kywrdform'>מילת מפתח:</div> <input type='text' name='keyword[[COLOR="Red"]1[/COLOR]]' class='kywrd1' /></div>"; ... for ($i = 0; $i < MAXINDEX; $i++) { …

Member Avatar for smantscheff
0
265
Member Avatar for dyingatmidnight

It is not clear from your post if you want to store the binary image data in the database or references to files on the server.

Member Avatar for mwasif
0
118
Member Avatar for denvious

Do a UNION query which combines all tables together with a table ID. Make it a view. Then query this view for ID, Title, Max(Date), Count(*) GROUP BY tableID.

Member Avatar for denvious
0
200
Member Avatar for Lapixx

Set up your table, fill it with some test data and let MySQL EXPLAIN your query. Then try an alternative approach using two left joins from the likes table into itself. See which one is more readable and more efficient (in terms of the EXPLAIN results). Try to guess which …

Member Avatar for smantscheff
0
194
Member Avatar for zaijenyap

Submit a complete test case with CREATE TABLE statements and INSERT statements and the queries which do not work as expected. I'm sure that you'll find your error when you prepare the test case.

Member Avatar for debasisdas
0
865
Member Avatar for mrhankey

This looks like a somewhat awkward table setup. You'd better have one table for visitdates and one for addresses.

Member Avatar for smantscheff
0
89
Member Avatar for sagive

You got your quote marks mixed up. Try [CODE]title='" . $row['username'] . " - " . $row['password'][/CODE]

Member Avatar for sagive
0
93
Member Avatar for epicrevolt

If you have a well-structured programming style you can put your whole website script into one file. If your input and your processing code is in the same file chances are higher that you (and your fellow programmers) spend less time searching for it. And re-factoring might be easier, depending …

Member Avatar for smantscheff
0
188
Member Avatar for dyingatmidnight

1) Show your login/logout code. 2) Show the exact error message. Does it really say "Unidentified value" -?

Member Avatar for dyingatmidnight
0
111
Member Avatar for kartisathis
Member Avatar for epicrevolt

What does "fairly large" mean? 1.000 users, 10.000, a million? If it's below a million you should care primarily for coding and usage efficiency, not for performance. MySQL is quite performant itself. Avoid the wildcard * in your queries, though. So it boils down to a question of standard table …

Member Avatar for epicrevolt
0
128
Member Avatar for dyingatmidnight

Well, normalization-wise you can't. The transaction ID is an easy way to refer to the checkout table in relations, but it does not solve your original problem. The three column unique index (cardnumber,libraryid,chekcoutdate) which urtrivedi proposed is a step further, but still the user cannot checkout a book on the …

Member Avatar for dyingatmidnight
0
99
Member Avatar for Xtremer360

Follow the standard procedure for normalization. Make a list of all the fields which you will have to store and resolve the functional dependencies. Do not store anything which can be computed (for example the number of matches). Have a separate lookup table for each list/dropdown value. And do not …

Member Avatar for smantscheff
0
172
Member Avatar for warlord902

Resolve the functional dependencies to get to 3NF. Each user has exactly one password, but obviously can have several usernames on various protocols with single passwords. So the only dependent value which should go in the primary table together with the user name is the password: [ICODE]Table Users (id_user, username, …

Member Avatar for smantscheff
0
179
Member Avatar for pecet

Google for "cartesian product". When you query two tables, the result set is the cartesian product of those two tables, which means, each row of table1 is combined with each row of table2, so you get a result set of n1 * n2 rows. The query which you propose filters …

Member Avatar for pecet
0
387
Member Avatar for PsychicTide

Aside from utridevis proposal to get at the error itself, your code is pathetically awkward. How can you know how many rows and how many variables you will have? Construct a loop instead which reads from server1 and imports into server2 one row at a time. Also, if I had …

Member Avatar for PsychicTide
0
200
Member Avatar for veledrom

Your query shows the cartesian product of your tables. Since you have two colors for the product and two images, the result has to have (at least) 4 rows. Maybe you can use the group_concat function to pack all product and all image values in only one field which you …

Member Avatar for veledrom
1
199
Member Avatar for donjohnston

Just read the error message carefully. And then erase one of the double "INTO into" from your query.

Member Avatar for donjohnston
0
314
Member Avatar for dyingatmidnight

You confused formatID and formatType. Instead of [CODE]$formatID = mysql_query("select formatID from format where formatType = '$format'") OR die(mysql_error());[/CODE] code [CODE]$formatID = mysql_query("select formatID from format where format[COLOR="Red"]ID[/COLOR] = '$format'") OR die(mysql_error());[/CODE]

Member Avatar for dyingatmidnight
0
121
Member Avatar for mrhankey

Show the table definitions (the CREATE TABLE statements). And your design is flawed. Do not add a column for each category but store categories in their own table and refer to that table.

Member Avatar for smantscheff
0
71
Member Avatar for warlord902

Your clients need access to a mysql server, either on their local machines or a server in their own network or a server which is accessible through the internet. So either you setup a mysql server on each client machine, or you set up a server in their network, or …

Member Avatar for warlord902
0
285
Member Avatar for Tunnleram

Please submit some test data (as CREATE TABLE and INSERT statements). Regarding table design, it would be easier for you with normalized tables. Create a table favorite_game with person_id and game_id instead of your favorite_game_xx fields.

Member Avatar for pratik_garg
0
88
Member Avatar for farsen

I don't know about C# but I noticed a design flaw in your query. Do not use more than one literal value to link the two tables: [CODE]SELECT * FROM `Families`, `Members` WHERE `Families`.`FamilyId`='132' AND `Members`.`FamilyId`=`Families`.`FamilyId`;[/CODE] In your sample code you use two different FamilyIds which is exactly the kind …

Member Avatar for smantscheff
0
127
Member Avatar for extemer

Start at the beginning, go right through the middle and up to the end. For further help please clarify your request.

Member Avatar for smantscheff
0
92
Member Avatar for shinysherbina

To my knowledge there is no tee statement in mysql server. You have to process the log file from the OS level or use the mysql command line client which knows how to tee.

Member Avatar for cheelee
0
730
Member Avatar for cmccully

Pritaeas is right about unique fields. You could bracket your select and insert query into a transaction, but that would not exclude the remote possibility that someone with direct access to the database might enter duplicate names and email addresses - for example an admin who is not using your …

Member Avatar for cmccully
0
167
Member Avatar for xero771

JOIN is a part of a clause for querying related tables, not for design. You are on the right track. Use foreign keys wherever possible to enhance database integrity. No, they don't harm the performance except with large insert or update operations. But unless you have millions of users you …

Member Avatar for smantscheff
0
113
Member Avatar for Antrim

With your design you have to allow NULL values in the foreign key fields so that an order can be related either to a customer or to an admin. But that would leave room for orphaned orders with neither customer nor admin associated with them. Also then an order could …

Member Avatar for Antrim
0
191
Member Avatar for Nybuler

What for would you need nl2br when storing the values? You need this function to display line breaks in HTML, not to store them in the database. Use [CODE]INSERT INTO global_leave_replacement_application (pic_staffcode) VALUES ('$pic_staffcodeS')"[/CODE]

Member Avatar for Nybuler
0
415
Member Avatar for dyingatmidnight

How exactly did you export and import it and what error message do you get? Use mysqldump for export and the mysql command line interface for import. Make sure that the mysql user account on the import side has the right to create tables.

Member Avatar for dyingatmidnight
0
133
Member Avatar for XAMPP user

If you are working with windows, start xampp-control in the xampp directory for an interface to the various services. Alternatively you can start/stop the services with NET [START|STOP] MYSQL NET [START|STOP] APACHE2.2 from the command line. Also have a look at the error log in /xampp/apache/logs. my.ini should be in …

Member Avatar for smantscheff
0
70
Member Avatar for VengefulWrath

DESC is a reserved keyword in (my)sql used with ORDER BY. Don't name your fields as reserved keywords.

Member Avatar for VengefulWrath
0
202
Member Avatar for McLaren
Member Avatar for Hakoo

You connect to mysql by supplying a username, a password and optionally a port and a database name to you connecting interface, be it the mysql command line client or JDBC or ODBC or PHP or whatever. Server versions on linux and windows (WAMP/LAMP/ work alike. The only practical difference …

Member Avatar for smantscheff
0
200
Member Avatar for smantscheff

Have a look at this HTML code. In IE7 it displays two rows of a table-like form, much the same as in Firefox 3.x, 4 and Chrome. Now uncomment the [ICODE]"<!--div>abc</div-->"[/ICODE] and look again. Now the row spacing has become much larger, about 1em. I don't have a clue where …

0
105

The End.