-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to use due to the namespaces (non-commandline) #26
Comments
Hi, I am sorry you are having problems getting started. It doesn't really sound like your problem is anything to do with this library, but more to do with correctly loading libraries into your application. However, I am happy to try and help if I can. First of all, I would recommend installing this via composer as suggested in the docs, which is the standard package manager for PHP. You can do this using If you are unsure how to use composer, you can get started here. If this isn't an option for you, then you are most likely going to have to include each library file manually. This is going to be tricky, but should be possible. If this is the direction you are going to go, then please feel free to post the code you have tried to use here, and I'll try and make suggestions. |
Thanks for your response. First, composer not an option. I cannot install stuff on my godaddy account (except you can help on how to use composer on a shared-hosting godaddy hosting without them yelling all over) With regards to what I have tried, I noticed some namespaces whose file are not in the downloaded zip (master). These namespaces are
So I think I need those files. What I have tried so far:
Also, as you may have seen, I do not know how to use |
You do not install composer on your remote server, so GoDaddy has nothing to do with this. Composer is something you use locally to install and manage your package dependencies. You are right, this library has a dependency on https://github.com/mrjgreen/database. Composer will automatically install this for you. I suggest you take a look at how to get started with composer for windows. This is the best advice I can offer at this stage, and it is absolutely the best way for you to achieve what you are trying to do. |
So how do I use |
Unless you have very specific requirements, you will most likely not need to use the Is there a specific reason you need to check a date column? |
Yes, I have a specific reason. I have a remote server that stores records in
So sometimes I do stuff locally that updates this record and I want to update such changes on the remote server. Therefore I need a tool that will update remote record when Can this tool handle this? If not, no any tool that can handle it? |
Okay - this sounds like a fairly strange requirement and possibly a little risky, both in terms of data integrity and security. I strongly suspect there is an architectural solution to your problem that would perhaps lead to a better set up, but if you do need to do this, then I would recommend the following:
REPLACE INTO users
SELECT users_sync.* FROM users_sync
LEFT JOIN users USING(id)
WHERE users.last_updated IS NULL OR users_sync.last_updated > users.last_updated |
Whao! Thanks pal. You just saved the day! |
My Table has a primary key, but when I run The DbSyn, it returns an error table does not have a primary key what can I do. |
I find this tool impossible to use for non-commandline.
I simply wanted to test on localhost before using in production.
I downloaded the archive, extracted it to 'test' directory in root folder. I copied and pasted the sample code under the "Use library within project (non-commandline)" section of Readme.md
I got error: "Fatal error: Class 'DbSync\DbSync' not found in /media/deo/windowsbase/xampp/htdocs/iuo/portal/toolz/mysync/test.php on line 9"
No amount of tweaking made it work, including use include()/required(), appending backlash to beginning of namespace use directive, etc. (although my experience of using PHP namespaces is that you have to include() or require() source namespace files before using them, but does not work here)
I simply want to test this tool, now the first attempt at test is not even working, or is it simply impossible to use it as a normal PHP class script without any installations/extension loading?
The text was updated successfully, but these errors were encountered: