OXID Community Forum

> International Forums > Developers > Problem with storing into database
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: Problem with storing into database


Reply
 
Thread Tools Search this Thread Display Modes
#Top   #1  
Old 07-06-2017, 12:51 PM
[email protected] m20@euroblaze.de is offline
Junior Member
Join Date: Apr 2017
Posts: 16
m20@euroblaze.de is on a distinguished road
Default Problem with storing into database

Hello,

I have a problem while storing into the database.
If I execute an insert query everything is fine and working but if I use save() function, it is inserted into the database but empty,
Even if I use this example.
PHP Code:
$product oxNew'oxarticle' );
$product->oxarticles__oxtitle = new oxField 'productTitle' );
$product->oxarticles__oxshortdesc = new oxField'shortdescription' );
$product->save(); 
What might be causing this problem?

Thank you.
Martina
Reply With Quote
#Top   #2  
Old 07-06-2017, 01:15 PM
vanilla thunder's Avatar
vanilla thunder vanilla thunder is online now
Marco's Sidekick
Join Date: Nov 2010
Posts: 6,358
vanilla thunder is on a distinguished road
Default Re: Problem with storing into database

this code works for me
Reply With Quote
#Top   #3  
Old 07-06-2017, 02:08 PM
[email protected] m20@euroblaze.de is offline
Junior Member
Join Date: Apr 2017
Posts: 16
m20@euroblaze.de is on a distinguished road
Default Re: Problem with storing into database

If I try this for example:

PHP Code:
    $manufacturer=oxNew('oxmanufacturer');
    
$manufacturer->oxmanufacturers__oxtitle=new oxField('Title1');
    
$manufacturer->oxmanufacturers__ebox_manufacturer_code=new oxField('Code1');
    
$manufacturer->save(); 
the data for ebox_manufacturer_code is inserted, but oxtitle is empty.
Reply With Quote
#Top   #4  
Old 07-06-2017, 02:19 PM
vanilla thunder's Avatar
vanilla thunder vanilla thunder is online now
Marco's Sidekick
Join Date: Nov 2010
Posts: 6,358
vanilla thunder is on a distinguished road
Default Re: Problem with storing into database

this code also works for me.

Do you have multiple languages in your shop? Your data might be stored into different language than you are viewing
Reply With Quote
#Top   #5  
Old 07-06-2017, 02:24 PM
[email protected] m20@euroblaze.de is offline
Junior Member
Join Date: Apr 2017
Posts: 16
m20@euroblaze.de is on a distinguished road
Default Re: Problem with storing into database

Ohh :/
Can't believe. That is the problem.
Thank you!
Reply With Quote
Reply

Bookmarks

Tags
database, problem, sql, storing

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting, updating and storing database data Marco Steinhaeuser Developers 0 01-12-2015 11:11 AM
New format of storing article pictures adam.sandor General 3 09-17-2013 03:11 PM
database relationships Hancas Newbies 2 01-24-2013 09:46 AM
Installation problem...ERROR:no database connection possible stm002 Installation and configuration 3 03-11-2012 01:17 PM
Add a new row in database [email protected] Developers 3 07-08-2010 09:35 AM

All times are GMT +1. The time now is 02:29 PM.