SELECT name, value
FROM serendipity_config
WHERE authorid = 0
This query does not yield any results! But it should return all rows of the table. Check the same changed function in your MySQL s9y installation and then you see how the rows should be returned.
Maybe your serendipity_db_query() function does not work at all. Check it out in MySQL to see how it's supposed to work and return rows.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I chnaged the serendipity_db_query function. I just created a samll dummy program to create table, insert rows, select rows etc. its working fine. so i just added those functionality in current Serendipity_db_query()
Its showing the whole Arrays... the whole data from serendipity_config table is displayed as an output....
Exactly, that is the desired output!
why it is not displaying it to me... ?
Because it seems that your serendipity_db_query does not properly return an array.
I'm sorry, I don't have any Oracle expierence, so I cannot tell you what to use to get the same results as with pgsql, mysql or sqlite. Maybe Falk can help here?
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
We observed different RETURN types in serendipity_db_query() like 'assoc' => OCI_ASSOC,'num' => OCI_NUM,'both' => OCI_BOTH,'true' => true,'false' => false. It shows that any of these types will be returned. But we never observed any code for checking the type of the value returned by serendipity_db_query() in the calling function/program. Then what is the significance of having these many return types ?
Again,
As per the definition of serendipity_db_query(),
The wanted return code is passed as the 3rd. argument to serendipity_db_query.
Most db queries use "both" as the result type (which yields arrays like $serendipity[0] = 'x', $serendpity['column'] = 'x').
"assoc" only returns textual associations ('column1', 'column2', ...) whereas "num" only returns 0, 1, 2... etc.
Please check the PHPDoc code commentare inside the mysql files to see what $single / $result_type etc. indicates.
The best way for you would be to execute different function calls in your mysql install and see the differents. Like execute "SELECT * FROM serendipity_config" like this:
print_r(serendipity_db_query("SELECT * FROM serendipity_config"));
print_r(serendipity_db_query("SELECT * FROM serendipity_config", false, 'num'));
print_r(serendipity_db_query("SELECT * FROM serendipity_config", false, 'assoc'));
print_r(serendipity_db_query("SELECT * FROM serendipity_config", true));
print_r(serendipity_db_query("SELECT * FROM serendipity_config", true, 'num'));
print_r(serendipity_db_query("SELECT * FROM serendipity_config", true, 'assoc'));
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Thanks for your quick and eloborated explanation. Good news is that, we crossed that point and getting the proper return type(s) from serendipity_db_query(). The below is the value of $serendipity array of PHP which has the values of serendipity_config table.
The above values are in sink with the MySql values.
The point where we struck now is:-
We are getting a blank page at the 4th stage of installation, where we should get a personal bolg page containing some plug-ins like Calendar and other stuff.
We would like to know basing on which parameters the plug-ins will be decided and added to the bolg page ?
Can I dare to ask your contact number to get clarified with my queries in quick time ? [ if you dont mind on that. ]
Thus, serendipity is getting values different from what it expects!
My ICQ number should be in my footer: #21392242.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
We made the array to display in the same format as what mysql displays..
And the exciting thing is we are getting the blog page.... with "John Doe Personel blog" as header. But the control on right hand side of the page are not displayed.
This means that $plugin_data['name'] is empty on your installation, but in reality it should hold the classname of the plugin. Plus, you surely are missing other important $plugin_data array values which is why loading the plugins fails!
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
What does the autoincrement field works in mysql? In more words,
01. For which fields of which tables it should be incremented ?
02. For which fields of which tables it should get the latest value ?
We wrote different sequences in Oracle for all the tables for which we found AUTOINCREMENT keyword in MySql code. Is it ok ??
I hope you remember me when you got it all up and running, because I'd love to put your work and the oracle interface into Serendipity.
What does the autoincrement field works in mysql? In more words,
01. For which fields of which tables it should be incremented ?
02. For which fields of which tables it should get the latest value ?
The autincrement field automatically inserts primary keys for the tables for new records. This way, the first entry gets ID 1, the second ID 2 and so on - each time a new record is inserted, it will automatically be set to the ID of the next free integer number.
The fields that need auto-increment can be found in the db.sql file, {AUTOINCREMENT} is attached to thos.
We wrote different sequences in Oracle for all the tables for which we found AUTOINCREMENT keyword in MySql code. Is it ok ??
That should be sufficient, even though I am personally not familiar with the concept of sequeneces, because basically mysql handles them internally.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
In Mysql, the "Authorid" field in serendipity_authors is AutoIncrement field.
But there is "AuthorID" field in serendipity_authorgroups, serendipity_category, serendipity_config , serendipity_entries, etc.
The value of "AuthorID" gets populated by autoincrement in serendipity_authors , but how it gets inserted in different tables.
For me all different tables entries for Authorid are empty.
so , it is giving me problem while fetching entry record for "Edit Entry" and "Create new category".
In Mysql, the "Authorid" field in serendipity_authors is AutoIncrement field.
But there is "AuthorID" field in serendipity_authorgroups, serendipity_category, serendipity_config , serendipity_entries, etc.
Yes, that's a usual 1:n association of one primary key to related foreign keys.
The value of "AuthorID" gets populated by autoincrement in serendipity_authors , but how it gets inserted in different tables.
For me all different tables entries for Authorid are empty.
Serendipity retrieves the ID of the last inserted entry via the "serendipity_db_insert_id()" function. On MySQL, this executes the "SELECT LAST_INSERT_ID()" function, which will return the ID of the last inserted primary key. s9y uses this return value to insert corresponding foreign keys into the other tables.
So, by default s9y would create a new author in serendipity_authors, then retriev the author ID via this db_insert_id() function and then INSERT the correponsding ID into the serendipity_authorgroups or other tables.
The same for entry creation: The last insert ID is returned and then used for follow-up functions.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/