Jump to content

sgalmeida

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sgalmeida's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Greetings I have a PHP/MySQL site and recently I changed it from host server, to another company. In the host server where it was installed previously it worked fine, no troubles but now on this one this got messed. On the database I have text such José but when PHP shows these text on screen it comes as JOSÉ. But in database is stored José! I belive there is something on this new host server that messes with this kind of text. What should I change to things work properly as previous? On the previsou host site this didn't happen. I have not changed a single line of code, just uploaded it to the new host server. On [a href=\"http://207.150.184.70/~joviflex/_testes/phpinfo.php\" target=\"_blank\"]this link[/a] you can see the phpinfo() of the host server TIA sgalmeida
  2. Greetings I'm using dreamweaver as IDE to PHP and I need to use inc files, but all I can see is black code. The code is hard to understand. How can I turn on the php syntax highlight for inc files on DW(if this is possible)? Thank you very much Sérgio
  3. Greetings I have a question about SQL on MySQL. I want to make a SQL file to import to MySQL for filling the tables, but I want to preserve the foreign keys. I want to know if it is possible to use variables (or something like that) in SQL scripts for MySQL. Imagine this: my database has 2 tables: product and lot. The table product is defined as: CREATE TABLE product ( productCode VARCHAR(32), price VARCHAR(32), oid INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(oid) ); and the table lot is defined like: CREATE TABLE lot ( lotcode VARCHAR(32), product INT UNSIGNED, quantity INT, oid INT UNSIGNED AUTO_INCREMENT, FOREIGN KEY(product) REFERENCES product(oid), PRIMARY KEY(oid) ); In this way, while developing the script SQL file, I habe to know the OID\'s of the products when I do the insert on table lot. INSERT INTO product (productCode, price) VALUES (\"Nike001\",\"120\"); INSERT INTO product (productCode, price) VALUES (\"Adidas001\",\"100\"); -- were somewere I have to do something like this -- SELECT oid FROM product WHERE productCode=\"Nike001\" AND price=\"120\"; -- to be able to insert data on lot\'s table. INSERT INTO lot (lotcode, product, quantity) VALUES (\"LotNike001\",oid of product nike001, 12); or INSERT INTO lot (lotcode, product, quantity) VALUES (\"LotNike001\", [sELECT OID FROM product WHERE productCode=\"Nike001\" AND price=\"120\"], 12); <--- does this work?? So, is it possible to retrieve and save this data (oid of product) and use it in insert on other tables? If not, what you suggest for me to do to achieve what I want (fill the database with data and preserve the foreign keys) Thank you all. Almeida
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.