Topic RSS
12:58 pm
Please replace the ??? with your data!
- Your URL: http://www.micromann.com
- The browser used: firefox
- cforms version: latest
- Your Wordpress version: latest
[desc]:
_Hi friends,
The data stored in cforms created tables is in vertical format rather than horizontal and I find it difficult to fetch for a display on a different page..
Kindly guide..
thanks in advance
bhavesh ruparelia
6:40 pm
March 6, 2005
Offline2:12 pm
hi oliver,
I have uploaded a mysql database of a cforms form at..
http://www.micromann.com/images/form20.txt
it needs to be imported to your mysql database..
and it is to be displayed as per the image at
http://www.micromann.com/images/form20.JPG
- What I specifically mean is that the data is stored in the database in the vertical column format, while I need to diplay in the page in the horizontal row format..
Kindly guide..
- Also which databse storage format is better in performance- vertical column storage or horizantal row style ?
thanks in advance
bhavesh r
6:58 pm
March 6, 2005
OfflineWhen I coded the two cforms tables, I wanted to keep the foot print and data use minimal. In your example you replicate sub_date & email across all fields, all the time.
Performance wise, it doesn't matter much and if it really did (millions of users on your blog) I'm sure this SQL part is the least of your worries. ;-)
To access the entries more conveniently I'll add PHP routines (ilke a semi 'API') with version 9.
7:25 am
thanks oliver..
When do you expect to launch the version 9 with the semi api solution ?
thanks & goodluck
bhavesh r
7:33 am
March 6, 2005
OfflineI can send you a beta per email.
Launch may happen anywhere in the next 5-10 days.
5:37 pm
oliver,
If there is a solution to fetch-display the data in the beta as mentioned in your reply…kindly send the beta to my email admin@micromann.com
thanks & goodluck
bhavesh r
7:11 pm
March 6, 2005
Offlinewith v9, there is a function call you can make:
$results = get_cforms_entries($fname,$from,$to,$sort,$limit);
which will return an array with the search results. simply do a print_r($results); to see what the array looks like.
then simply run a forwaech loop and render the contents in whatever fashion you like.
- $fname =
any form name text pattern - $from, $to =
any date, format: "Y-m-d H:i:s" - $sort =
form_id, id, sub_date, ip or email - $limit =
# of results, '' = no limits (empty string)
6:49 am
thanks a lot oliver..
I'll try v 9.0 beta now..
thanks again
bhavesh r
8:35 am
thanks for the beta version..
- The problem is that this fetch function is working in wordpress environment only ( it doesn't work directly ina php page ) and we need a plugin which lets us embed php seamlessly..
- we are using runphp plugin| php-exec for the same but code is not hidden through this plugin and code is displayed on the page rather than the database display that we want..
- I await your comments on this..
thanks
bhavesh
8:54 am
March 6, 2005
Offlinetrue, but at the least you can borrow the code from the new function (lib_aux.php)
4:49 pm
oliver,
I request you to advice on the following…
Is it possible to store the cforms data in the horizontal format in the database instead of the present vertical format by changing some coding ?
Our developers are accustomed to working in the horizontal data format in the database..Since fetching etc becomes easier if the data is stored in the horizonatl format..
thanks in advance
bhavesh r
10:31 pm
March 6, 2005
OfflineIs it possible to store the cforms data in the horizontal format in the database instead of the present vertical format by changing some coding ?
It depends on your coding skills (PHP + MySQL). I recommend you turn off cforms own DB tracking and add your code to my-functions.php.
1:41 am
This looks just what I'm after, but calling the function is just printing the SQL query direct to the page.
I'm sure I'm doing something wrong – but what?
2:25 am
It returns:
SELECT * FROM wp_circus_cformssubmissions WHERE form_id IN ('2') ORDER BY id LIMIT 0,<br>SELECT * FROM wp_circus_cformsdata WHERE sub_id IN ()<br>
as if it has been echo'd, and any variable I set to get_cforms_entries()
is empty
7:53 am
March 6, 2005
Offline- you need to use 'my_cforms_action()' and add your code to this function
- you code above is a SELECT statement, I would have expexted an INSERT
This looks just what I'm after, but calling the function is just printing the SQL query direct to the page.
what function, when?
10:58 am
Sorry, don't understand at all – the help file says:
get_cforms_entries('','','','','') will "return a set of stored form submissions in a multi-dimensional array."
using code in a wordpress template file eg:
$Names =get_cforms_entries( 'Social media surgery signup', '', '', '', '' );
print_r ($Names);
should in theory print to the browser the array – so i can investigate the structure and then write the php to output what I want. It doesn't. (btw the code is outside the WP 'loop', but that shouldn't me an issue?).
The function prints what looks like an MYSQL query to the html page, and the array prints as empty:
SELECT * FROM wp_circus_cformssubmissions WHERE form_id IN ('2') ORDER BY id LIMIT 0,
SELECT * FROM wp_circus_cformsdata WHERE sub_id IN ()
Array ( )
Looking at the HTML code the "query" has <br/>s in it. Trying to build an MYSQL query and use statement only bring up an error that the query doesn't work.
So either the help file could do with a little extra into, or there's a bug/issue with my set-up.
12:57 pm
thanks..
1.you need to use 'my_cforms_action()' and add your code to this function
2. How to know the text box name or select box name for the insert query ?
thanks in advance
bhavesh r
5:21 pm
March 6, 2005
OfflineI'm confused as to what you want: earlier you said:
Is it possible to store the cforms data in the horizontal format in the database instead of the present vertical format by changing some coding ?
..which indicated to me that you're looking to use some mechanism to feed submitted data into your own tables, no?
Most Users Ever Online: 959
Currently Online:
88 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
tracedef: 43
mores: 21
Gyrus: 20
frozenwaste: 18
asuffredini: 15
photoworks: 14
Member Stats:
Guest Posters: 3548
Members: 1464
Moderators: 3
Admins: 1
Forum Stats:
Groups: 1
Forums: 4
Topics: 5157
Posts: 18385
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6398)
FAQs
Home
Add Reply
Add Topic
Quote










