Skip to content
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

Using Replace the query works but return null #77

Open
marcosfreitas opened this issue Apr 15, 2016 · 1 comment
Open

Using Replace the query works but return null #77

marcosfreitas opened this issue Apr 15, 2016 · 1 comment

Comments

@marcosfreitas
Copy link

I can use the REPLACE INTO instead of INSERT, UPDATE and DELETE perfectly, but the object returns NULL.

This works, but $add returns null;
$add = $db->query("REPLACE INTO ads (fk_user, ad_title, ad_description, ad_files, ad_type, ad_mode, ad_reward, ad_location, ad_cdate, ad_udate, ad_status, ad_slug, ad_tags, ad_solved, ad_reports) VALUES (1, 'title', 'description', 'files', 1, 1, 1.12, 'location', NOW(), NULL, 1, 'slug', 'tags', 1, 0)");

@marcosfreitas
Copy link
Author

Well seems simple but I fix this adding || $statement === 'replace' at line 194 of Db.class.php and that query object return a int value successfully

replace
;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant