Jump to content

miffe

Members
  • Posts

    84
  • Joined

  • Last visited

Everything posted by miffe

  1. Ok, the query is complete madness because I need to show various things at the same time which are the result of multiplications and other operations with other values of other tables so it's kind of confusing, works in access but wont work in MySQL...I was advised that mysql wont accept access []'s (square brackets) and access also uses excess ()'s, as well at using the table!column nomenclature which I need to "convert" to real time or so I was said, but I have no clue because the whole query looks massive and I don't know where to start :sSELECT modelos.idModelo, modelos.nombre AS Modelo, tiposJoyas.nombreTipo, colores.color, brillantes.tamanoPiedra AS BTE, Round(Sum([valorVenta]+((brillantes!costoBTE*brillantes!importacion*brillantes!utdBruta/brillantes!comisionRep*brillantes!tamanoPiedra)+((ensambleMontadura!precioOro*32.15/1000*0.585+ensambleMontadura!costoAleacion+ensambleMontadura!utdBruta/ensambleMontadura!comisionRep+ensambleMontadura!costoEnsamble)*modelos!pesoMontadura))/2)) AS Normal, Round((Sum([valorVenta]+((brillantes!costoBTE*brillantes!importacion*brillantes!utdBruta/brillantes!comisionRep*brillantes!tamanoPiedra)+((ensambleMontadura!precioOro*32.15/1000*0.585+ensambleMontadura!costoAleacion+ensambleMontadura!utdBruta/ensambleMontadura!comisionRep+ensambleMontadura!costoEnsamble)*modelos!pesoMontadura))/2)/0.9)) AS Alta, Round((Sum([valorVenta]+((brillantes!costoBTE*brillantes!importacion*brillantes!utdBruta/brillantes!comisionRep*brillantes!tamanoPiedra)+((ensambleMontadura!precioOro*32.15/1000*0.585+ensambleMontadura!costoAleacion+ensambleMontadura!utdBruta/ensambleMontadura!comisionRep+ensambleMontadura!costoEnsamble)*modelos!pesoMontadura))/2)*0.85+1.2)) AS Casal, Round((Sum([valorVenta]+((brillantes!costoBTE*brillantes!importacion*brillantes!utdBruta/brillantes!comisionRep*brillantes!tamanoPiedra)+((ensambleMontadura!precioOro*32.15/1000*0.585+ensambleMontadura!costoAleacion+ensambleMontadura!utdBruta/ensambleMontadura!comisionRep+ensambleMontadura!costoEnsamble)*modelos!pesoMontadura))/2)*2)) AS Menudeo, Round((Sum([valorVenta]+((brillantes!costoBTE*brillantes!importacion*brillantes!utdBruta/brillantes!comisionRep*brillantes!tamanoPiedra)+((ensambleMontadura!precioOro*32.15/1000*0.585+ensambleMontadura!costoAleacion+ensambleMontadura!utdBruta/ensambleMontadura!comisionRep+ensambleMontadura!costoEnsamble)*modelos!pesoMontadura))/2)/0.95)) AS Cristal, Round((Sum([valorVenta]+((brillantes!costoBTE*brillantes!importacion*brillantes!utdBruta/brillantes!comisionRep*brillantes!tamanoPiedra)+((ensambleMontadura!precioOro*32.15/1000*0.585+ensambleMontadura!costoAleacion+ensambleMontadura!utdBruta/ensambleMontadura!comisionRep+ensambleMontadura!costoEnsamble)*modelos!pesoMontadura))/2)*1.2)) AS MM FROM tiposJoyas INNER JOIN (insumosFijos INNER JOIN (ensambleMontadura INNER JOIN (colores INNER JOIN (brillantes INNER JOIN ((modelos INNER JOIN modelosInsumos ON modelos.idModelo = modelosInsumos.idModelo) INNER JOIN modelosColores ON modelos.idModelo = modelosColores.idModelo) ON brillantes.idTipoBTE = modelos.BTE) ON colores.idColor = modelosColores.idColor) ON ensambleMontadura.idEnsamble = modelos.idEnsamble) ON insumosFijos.idInsumo = modelosInsumos.idInsumo) ON tiposJoyas.idTipoJoya = modelos.idTipo GROUP BY modelos.idModelo, modelos.nombre, tiposJoyas.nombreTipo, colores.color, brillantes.tamanoPiedra; thx.miffe
  2. miffe

    MySQL-Excel

    I quickly read through the tutorial, and to me it seems that this method is actually via the network running this php script, which will execute the MySQL command and produce me a new file .xls (Excel worksheet) and try to download it to my PC. Is there no way to do this in an active worksheet?Is there any way to run PHP scripts in MS Excel, I know it's a bit dumb to ask (open source -vs- non open source) but even so I was wondering if someone had ever come up with an addon or fix, or module or something to try and implement this feature into excel... If this won't work I guess I'm screwed and I'll have to return back to my MS Access DB (after 2 days of work installind a mysql-php-apache server ;P)
  3. I know how NAFT the 'visual' query editor in Access is, but even so I used it to create a quite complex query, now I've moved the DB to MySQL, but the same query wont work because Access add's a whole load of ( )'s and stuff... IS there any way to accurately convert it? Or do I have to hand sort it and remove all the glitches?Thanks -miffe
  4. miffe

    MySQL-Excel

    Thx a lot for your help aspnetguy;What I'm actually trying to do is import values from mysql on pc_server onto an excel spreadsheet in pc1... lets say, I have a customers table in a DB on the server, and when the person at the desk wants to make a reciept she will go to a "select customer" drop down box which will execute a SELECT * FROM customers; in the Server DB and return the values into excel, I guess as a result array or something like in PHP.How can I run a PHP-MySQL Query from Excel if in this case it works?
  5. miffe

    MySQL-Excel

    The Excel spreadsheet is on PC1, the database is in MySQL on PC_Server, I have Apache installed on the server. As far as I know the server is in DMZplus (set automatically by the network config. because it was creating some kind of problem in DHCP).From inside an excel spreadsheet in PC1 how could I create a query, is this with ODBC? Or can I run a PHP script? or using VBA? or do I install ASP on the server and learn to code in that?My other problem is that I dont want the DB to be accessed from the exterior... but I've got apache running with phpMyAdmin to control the DB... how can I restrict access to the interior of the network (the LAN)... will .htaccess do the trick? or do I apply another kind of password protection to phpMyAdmin, or can I force apache/phpMyAdmin to work only as an interior service and not output to the internet?Thanks -Miffe
  6. miffe

    MySQL-Excel

    Is it possible to run query's from MS Excel on 'PC1' having on the same network 'PC_Server' which has Apache, MySQL and Php with MySQL Extensions?If so, how can I run the query and produce results?Thanks a lot,Miffe
  7. It's a .PDF file, confirmation worked for me in seconds, might be in your spam folder aspnetguy ;P834kb .pdf, haven't read it yet but the start seems somewhat interesting, i'd suggest giving it a look. if anyone wants me to email it to them no prob, just PM me.
  8. Err... no... DNS means "Domain Name Server" or also known as Domain Name System.
  9. I agree with you Jonas, the forum is perfect as it is, why do we need a skin to make it look like the main website? Or any of the other small details, they are just small needs that really don't need changing. If KaiJim had loads of spare time and was so critical about details I'm sure he'd get to it but... seeing as the forums works and has mod's and is active, why should he care? We're just fine like this after all.But concerning the voting system, it would be a bit of a problem implementing it, although if we came up with a mod all ready and just gave it to him, shouldn't be much of a problem installing it, but even so... as you said, I don't think someone would be up to the challenge to start with.Concerning the ranking system (rep-system), check out Experts Exchange, it has a system based on ranking and reputation, the more questions you answer, the further you go up in the ladder, and the people getting answered choose who helped him best with the answer, and who assisted, etc. The users that answer most questions get points to ask more questions, if you only ask, your points get finished and you can't ask until you answer to more. Mod's only clean up the forums and inactive threads basically.- It's quite a good system, but it's not as open as this one is... each one has it's advantages and disadvantages I guess... Ranking system seems like a good idea, but at the same time it's too complex to implement, and mods and admins don't have time so...In summary: We're alright as we are,so pretty much I just finished writing a complicated pointless post, just for the sake of it I guess. - miffe
  10. I have the next 3 tables (In an Access .mdb DB): (Products):--------------------idProduct | name--------------------1 E-Ring-12 E-Ring-23 F-Ring-1 (Resources):--------------------------------------------idResource | name | baseCost | formula--------------------------------------------1 gold 60 * 1.22 silver 30 * 3 + 23 0.10CT 90 * 1.2 + .104 0.12CT 110 * 1.2 + .12 (ProductsResources):----------------------idProduct | idResource----------------------1 12 12 33 13 4 So in the first table I have a list of products, in the second one I have a list of resources used to make products like gold, diamonds, etc... and each one of these has a different price and a formula. So I have an extra table to relate the products to the resources, 1-1, 1-2, 2-1, 2-5, etc...The problem: All the resources used for each product have a base price, the price they are originally bought at, and I use a formula to calculate how much goes into each product to give me a final 'sell price'. If there was one sell price for all the resources I could use a simple query with the operation stated there, but there is different operations for each resource.What I need is a Query (that'll work in Access) that will calculate the sum of all the final prices for the resources in a product.Example:Product "1" has resources "1, 3, 5"... these resources cost originally "5, 10, 15" dollars, and i want the sell price to be at "price * 1.2, price * 1.5, price * price" for them all. The total price for the product "1" would be the sum of " (5*1.2) + (10*1.5) + (15*15) " in this case... I want to be able to display the result for this with a Select...Any suggestions on how to make this query in access SQL format?Thanks in advance, Miffe
  11. I want to make a form and instead of using a button with the standard submit... use a graphic instead that will send some variables in the URL (to be GET'ted at the next page) and also send the variables in the post...I could likeways just use hidden boxes with the variables and no need to use the URL so all is sent through post, but I would like the know the real way of how to do this please..thanks- miffe
  12. ok thanks, now lets say i am going to host the server... ill download mysql server and install it, and download php5 and mysql extensions... all this will be inside a same company in the same building... i guess ill have to download Apache and run the .php files and the database on a server pc to give DB access to the other members of the internal LAN...I have two questions:1. how can i protect the database / website from being accessed from outside the LAN/router?2. how can i establish rights in my MySQL database, lets say i want to give certain table permissions to one user, and other vieweing permissions to another user, etc. ?thanks,miffe
  13. Ok, we all know that MS Access joins with ASP to make web interfases, MySQL joins with PHP to make web interfases, Access can also be used with JET or ADO to make Visual Basic or .NET computer interfases, now... Lets say I want to make a program to control a MySQL database...I get the MySQL Server installed on one server for a company, then on all client computers, how could I manage the database? What Programming Language do you recommend to manage a MySQL DB? Would it be better to code it in Access or MS SQL Server and code with windows? Or transfer to Linux? (It's not a massive database with hundreds of users, maybe just 10-15 users max.)Thanks,Miffe
  14. My Solution:Get MdbToMySQL XP, its a free program to convert the access database to MySQL queries, then run them on the server and tada! you've got a MySQL database easily compatible with PHP....Now say you want an ACCESS .mdb definitively, Yes you will have to use ASP as everyone else said, And if you tried running a .ASP script and all you got was the code, you haven't got IIS installed properly on the server you are running it on... If it's a separate domain try contacting your webhost, but if you own the domain, set up IIS as the previous reply says.Greetings,Miffe
  15. Ok, well I'm new here, and even though I tend not to introduce myself because it's a bit of a waste of time and I don't think anyone would read it anyway, but oh well... I'll do it this time for the sake of wasting time to see if i get a reply to my post hahah...Name: Mike (Miffe) WarGender: MakeCountry of residance: MéxicoCity of residence: Monterrey, NLEyes: Green/GrayHair: Dark Brown or somethingDrinking/Drugs: No/NoFavourite Music: Indie, Rock, ElectronicaFavourite Movies: Drama and Sad stuff, or ActionInterest: Guitars, Drums, Piano, HTML, PHP, GFX Design, PERL, QB, VB6, MZX&ZZT, and... Reading the news.
  16. miffe

    Linking DataBases

    Greetings this is my first time on the forum,I have a quick question which I hope someone could help me with... not directly related to the SQL language itself but with something associated with it. Question:I have an MS Access ( ,yeah, I know... ) database on PCADMIN,I want various columns from the result of a query to be sent to PC1, which has an Excel data table,I want various columns from the same query to be sent to PC2, in a new .mdb with only one table.Extra information:I was told that I should link Excel to the database in the server, possibly with ODBC and excel functions, the problem is that if the server is off (which it is some of the time) I won't have the info. What I was thinking was a way of making the Server (PCADMIN) after creating the query, transmit the info over the network with a client program in VB and pasting it in Excel, or is there an easier way? + Any ideas about how to create a new mdb from the one in the server in another computer with just 1 table with the query results?Thanks a lot in advance, I'm quite new to Databases and SQL, I'm taking a DB course right now but I'm not understanding it very well, any help you could provide I would really appreciate.Well thanks again,Miffe
×
×
  • Create New...