Jump to content

MachineHead933

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.HostMySite.com/?utm_source=bb

Profile Information

  • Gender
    Not Telling

MachineHead933's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. As your code stands now, you are setting "$affiliateresult" as the literal string that follows, which is just the text of the MySQL query. If you want the results of that query to be stored as an array in that variable you should use this: $affiliateresult=mysql_query(your_query_goes_here) You should then be able to do what you need to with the result set later on on Line X
  2. If you review the MySQL INSERT syntax, you can see this is not possible: http://dev.mysql.com/doc/refman/5.1/en/insert.html You will have to generate this using separate queries for each table. If you need to specify a specify the similarly named field in each table, you can do so by prefixing the column name with a table name, i.e.: INSERT INTO table1 (table1.column) VALUES ('somedata') versus... INSERT INTO table2 (table2.column) VALUES ('somedata')
  3. The best place to start is always a man page: http://www.manpagez.com/man/1/rsync/ What you are describing is essentially the default behavior of rsync, but your best bet would be to use -a, so your rsync would look like this: rsync -e ssh -avz --delete-after /path/to/stuff user@slave:/path/to -e Specifies the files will be sent through SSH -avz This is a combination of 3 options. The "-a" means archive. This will preserve symlinks, permissions, timestamps, group/owners, and will be recursive. The "v" makes the job verbose. This won't be necessary, but you can see what's happening with the rsync so you know if you've done something wrong. The "z" compresses data to speed up the transfer. --delete-after Will tell rsync to compare the destination against the source and delete any extraneous files after the rsync has completed. This is a dangerous option, so use with caution. I would recommend doing a dry-run before actually running any commands on your production environment, to do this, just throw an "n" into the command: rsync -e ssh -avzn --delete-after /path/to/stuff user@slave:/path/to This will spit out what rsync _would_ do, but doesn't actually copy anything. -- Vincent Gerbino HostMySite Technical Support, Manager vinny@hostmysite.com http://www.HostMySite.com?utm_source=bb
×
×
  • 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.