I posted this problem some time ago and failed to get it resolved.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL: WHERE 'cf_user_id' = 63' at line 1 SQL=SELECT count(*) FROM jos_chronoforms_SchoolDetails WHERE SQL: WHERE 'cf_user_id' = 63
Can some please help to resolve this?
Cheers
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL: WHERE 'cf_user_id' = 63' at line 1 SQL=SELECT count(*) FROM jos_chronoforms_SchoolDetails WHERE SQL: WHERE 'cf_user_id' = 63
WHERE SQL:
<?php
$user = &JFactory::getUser();
echo "WHERE 'cf_user_id' = ".$user->id
?>
Can some please help to resolve this?
Cheers
Hi tcole,
Bob
WHERE SQL: <<-- Delete this line
<?php
$user = &JFactory::getUser();
echo "WHERE 'cf_user_id' = ".$user->id
?>
Bob
Bob,
thanks heaps for that, that has got rid of the error.
But no data is shown.😟
Header:
Body:
Footer: empty no code
What I am trying to do is set it up so that the different schools can edit their data that they have set up via chronoforms.
This part is the school details and once I have that working I will then set up chronoforms with team info where again they can enter and edit their own data only.
Any suggestions that you can offer would be great.
Cheers
thanks heaps for that, that has got rid of the error.
But no data is shown.😟
Header:
{pagination}
<table width="100%" border="0">
<tr bgcolor="#CC0000">
<td width="20%"><strong>School Name:</strong></td>
<td width="20%"><strong>School Address:</strong></td>
<td width="20%"><strong>School Phone:</strong></td>
<td width="20%"><strong>School Email:</strong></td>
</tr>
</table>
<hr>
Body:
<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 20%;">{schoolname}</td>
<td style="width: 20%;">{schooladdress}</td>
<td style="width: 20%;">{schoolphone}</td>
<td style="width: 20%;">{schoolemail}</td>
</tr>
</tbody>
</table>
Footer: empty no code
What I am trying to do is set it up so that the different schools can edit their data that they have set up via chronoforms.
This part is the school details and once I have that working I will then set up chronoforms with team info where again they can enter and edit their own data only.
Any suggestions that you can offer would be great.
Cheers
Hi Terry,
The most likely reason for not displaying any data is that there are no records with the correct cf_user_id. Can you check that?
Bob
PS It's neater to use just a <tr>. . . </tr> in the Body section as that will keep the column widths stable. Put the <table> & </table> tags into the Header & Footer boxes.
Head:
Body:
Footer:
The most likely reason for not displaying any data is that there are no records with the correct cf_user_id. Can you check that?
Bob
PS It's neater to use just a <tr>. . . </tr> in the Body section as that will keep the column widths stable. Put the <table> & </table> tags into the Header & Footer boxes.
Head:
<table>
<thead><tr><th>. . .</th><th>. . .</th></tr></thead>
<tfoot><tr><tf>. . .</tf><tf>. . .</tf></tr></tfoot>
<tbody>
Body:
<tr><td>. . .</td><td>. . .</td></tr>
Footer:
</tbody></table>
Bob,
thanks for the code tidy up.🙂
Yes I have checked and the cf_user_id is correct.
I am sure that I must be missing something simple to why this is not working.
Do I need anything in the post or get variables???
cheers
thanks for the code tidy up.🙂
Yes I have checked and the cf_user_id is correct.
I am sure that I must be missing something simple to why this is not working.
Do I need anything in the post or get variables???
cheers
Hi Terry,
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
Hi Terry,
Fixed, in your 'Where' code you had single quotes '' round the column name instead of back-ticks ``. Here's how it needs to be:
Bob
Fixed, in your 'Where' code you had single quotes '' round the column name instead of back-ticks ``. Here's how it needs to be:
echo "WHERE `cf_user_id` = ".$user->id
Bob
Yes, I missed that at first to. This happens to me sometimes when I have copied and pasted code from a webpage into my editor and not caught that.
This topic is locked and no more replies can be posted.